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() {
|
||||
val name = "Kotlin"
|
||||
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
|
||||
// to see how IntelliJ IDEA suggests fixing it.
|
||||
println("Hello, " + name + "!")
|
||||
|
||||
for (i in 1..5) {
|
||||
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
|
||||
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
|
||||
println("i = $i")
|
||||
}
|
||||
val currentTurnInput = readln().toInt()
|
||||
val energyInput = readln().toInt()
|
||||
val multiplierInput = readln().toDouble()
|
||||
println("=== ИНИЦИАЛИЗАЦИЯ ПАРАМЕТРОВ ХОДА ===")
|
||||
println("Текущий ход: $currentTurnInput (тип Int)")
|
||||
println("Доступно энергии: $energyInput (тип Int)")
|
||||
println("Множитель урона: $multiplierInput (тип Double)")
|
||||
println()
|
||||
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