generated from admin/template
change code
This commit is contained in:
@@ -1,14 +1,32 @@
|
|||||||
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
|
||||||
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
|
||||||
fun main() {
|
fun main() {
|
||||||
val name = "Kotlin"
|
val currentTurnInput = readln().toInt()
|
||||||
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
|
val energyInput = readln().toInt()
|
||||||
// to see how IntelliJ IDEA suggests fixing it.
|
val multiplierInput = readln().toDouble()
|
||||||
println("Hello, " + name + "!")
|
println("=== ИНИЦИАЛИЗАЦИЯ ПАРАМЕТРОВ ХОДА ===")
|
||||||
|
println("Текущий ход: $currentTurnInput (тип Int)")
|
||||||
for (i in 1..5) {
|
println("Доступно энергии: $energyInput (тип Int)")
|
||||||
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
println("Множитель урона: $multiplierInput (тип Double)")
|
||||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
|
println()
|
||||||
println("i = $i")
|
print("Введите номер хода: ")
|
||||||
}
|
val currentTurn = readln().toInt()
|
||||||
|
var cardsPlayed = 0
|
||||||
|
println("=== ХОД № $currentTurn ===")
|
||||||
|
println("Игрок выводит Покемона на активную позицию!")
|
||||||
|
cardsPlayed++
|
||||||
|
println()
|
||||||
|
print("Введите базовый урон покемона: ")
|
||||||
|
val baseDamage = readln().toInt()
|
||||||
|
println("Применена карта Тренера 'Леди из Центра Покемонов'!")
|
||||||
|
cardsPlayed += 1
|
||||||
|
print("Сколько карт энергии прикрепить к Покемону? ")
|
||||||
|
val energyAttached = readln().toInt()
|
||||||
|
val turnCheck = currentTurn % 2
|
||||||
|
val turnType = if (turnCheck == 0) "Четный" else "Нечетный"
|
||||||
|
val finalDamage = baseDamage * multiplierInput
|
||||||
|
println("****************************************")
|
||||||
|
println("ОТЧЕТ О БОЕВОЙ ЭФФЕКТИВНОСТИ")
|
||||||
|
println("Тип хода (остаток % 2): $turnCheck ($turnType)")
|
||||||
|
println("Базовый урон: $baseDamage | Коэффициент: $multiplierInput")
|
||||||
|
println("Итоговый урон по противнику: $finalDamage")
|
||||||
|
println("****************************************")
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user