generated from admin/template
Загрузить файлы в «works/lab-02»
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
### IntelliJ IDEA ###
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
### Kotlin ###
|
||||
.kotlin
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
@@ -0,0 +1,35 @@
|
||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||
fun main()
|
||||
{
|
||||
var currentTurnInput: String = readln()
|
||||
var currentTurn: Int = currentTurnInput.toInt()
|
||||
var energyInput: String = readln()
|
||||
var energy: Int = energyInput.toInt()
|
||||
var multiplierInput: Double = 1.5
|
||||
var multiplier: Int = multiplierInput.toInt()
|
||||
println("=== Инициализация параметров хода ===")
|
||||
println("Текущий ход: $currentTurn (тип Int)")
|
||||
println("Доступно энергии: $energy (тип Int)")
|
||||
println("Множитель урона: $multiplier (тип Double)")
|
||||
println("=== ХОД № $currentTurn ===")
|
||||
var cardsPlayed = 0
|
||||
println("Игрок выводит Покемона на активную позицию!")
|
||||
print("Введите базовый урон покемона: ")
|
||||
val baseDamage = readln().toInt()
|
||||
println("Применена карта Тренера 'Леди из Центра Покемонов'!")
|
||||
cardsPlayed += 1
|
||||
println()
|
||||
print("Сколько карт энергии прикрепить к Покемону? ")
|
||||
val energyAttached = readln().toInt()
|
||||
cardsPlayed += energyAttached
|
||||
val finalDamage = baseDamage * multiplier
|
||||
val turnCheck = currentTurn % 2
|
||||
val parityText = if (turnCheck == 0) "Четный" else "Нечетный"
|
||||
println()
|
||||
println("ОТЧЕТ О БОЕВОЙ ЭФФЕКТИВНОСТИ")
|
||||
println("Тип хода (остаток % 2): $turnCheck ($parityText)")
|
||||
println("Всего сыграно карт за ход: $cardsPlayed")
|
||||
println("Базовый урон: $baseDamage | Коэффициент: $multiplier")
|
||||
println("Итоговый урон по противнику: $finalDamage")
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Kotlin2JvmCompilerArguments">
|
||||
<option name="jvmTarget" value="1.8" />
|
||||
</component>
|
||||
<component name="KotlinCommonCompilerArguments">
|
||||
<option name="apiVersion" value="2.4" />
|
||||
<option name="languageVersion" value="2.4" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/testResources" type="java-test-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Reference in New Issue
Block a user