Начал lesson5

This commit is contained in:
328p
2026-09-23 15:54:37 +03:00
parent 232574ec35
commit b3d30e6822
2 changed files with 49 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
+17
View File
@@ -0,0 +1,17 @@
//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 hand = mapOf(
"Pikachu" to "Pokemon",
"Potion" to "Trainer",
"Fire Energy" to "Energy",
"Professor's Research" to "Trainer"
)
val trainerCards = hand.filter { it.value == "Trainer" }
val upperNames = hand.map { it.value }
println(upperNames.joinToString(separator = ", "))
val energyToAttach = readln()
}