diff --git a/works/lab-05/lesson5/.gitignore b/works/lab-05/lesson5/.gitignore new file mode 100644 index 0000000..3ddbf4c --- /dev/null +++ b/works/lab-05/lesson5/.gitignore @@ -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 \ No newline at end of file diff --git a/works/lab-05/lesson5/src/Main.kt b/works/lab-05/lesson5/src/Main.kt new file mode 100644 index 0000000..557dd6a --- /dev/null +++ b/works/lab-05/lesson5/src/Main.kt @@ -0,0 +1,17 @@ +//TIP To Run code, press or +// click the 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() + +} \ No newline at end of file