generated from admin/template
Compare commits
2
Commits
d2ae34c121
...
4e6a997564
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e6a997564 | ||
|
|
0287da5069 |
@@ -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,44 @@
|
|||||||
|
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
|
||||||
|
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
|
||||||
|
fun main() {
|
||||||
|
println("=== ПРОВЕРКА СОСТОЯНИЯ ПОКЕМОНА ===")
|
||||||
|
print("Введите текущее HP: ")
|
||||||
|
val currentHpInput = readln()
|
||||||
|
val currentHp = currentHpInput.toInt()
|
||||||
|
print("Введите количество энергии: ")
|
||||||
|
val energyAttachedInput = readln()
|
||||||
|
val energyAttached = energyAttachedInput.toInt()
|
||||||
|
println("")
|
||||||
|
|
||||||
|
if (currentHp <= 0) {
|
||||||
|
println("Покемон в нокауте!")
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
println("Покемон в строю и готов к бою.")
|
||||||
|
}
|
||||||
|
var attackStatus: String = ""
|
||||||
|
if (energyAttached >= 3) {
|
||||||
|
attackStatus = "Доступна атака 'Giga Impact'"
|
||||||
|
} else {
|
||||||
|
attackStatus = "Нехватает ресурсов"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
println("")
|
||||||
|
println("=== РОЗЫГРЫШ КАРТЫ ТРЕНЕРА ===")
|
||||||
|
println("Введите название карты Тренера: ")
|
||||||
|
var trainerCardInput = readln()
|
||||||
|
var trainerCard = trainerCardInput.toString()
|
||||||
|
when (trainerCard) {
|
||||||
|
"Potion" -> println("лечениие на +30 HP.")
|
||||||
|
"Professor's Research" -> println("добор 7 карт из колоды.")
|
||||||
|
"Switch" -> println("замена активного Покемона.")
|
||||||
|
else -> {
|
||||||
|
println("Неизвестный тип карты")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user