This commit is contained in:
2026-10-19 14:19:45 +03:00
parent d430be35cf
commit 259a3a8d2b
24 changed files with 396 additions and 0 deletions
+32
View File
@@ -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
+11
View File
@@ -0,0 +1,11 @@
fun calcDamage(power: Int, multiplier: Double = 1.0): Double = (power * multiplier).toInt().toDouble()
fun checkStatus(hp: Int): String {
if (hp > 0) return "В строю"
else return "Нокаут"
}
fun printBattleLog(attacker: String, defender: String, damage: Int){
print("=== ИНИЦИАЛИЗАЦИЯ БОЯ ===\nВведите имя вашего Покемона: Pikachu\nВведите стартовое HP (по умолчанию 60): 60")
}