-
Notifications
You must be signed in to change notification settings - Fork 0
/
mutableList.kt
67 lines (58 loc) · 1.38 KB
/
mutableList.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
fun main() {
val bulbasauro = Pokes(
"Bulbasauro",
"Grama/Tóxico",
"Fogo/Gelo/Psíquico/Voador",
"Chicote de Vinhas",
"Folhas Navalhas"
)
val charmander = Pokes(
"Charmander",
"Fogo",
"Água/Ground/Pedra",
"Arranhão",
"Cauda de Chamas"
)
val squirtle = Pokes(
"Squirtle",
"Água",
"Grama/Elétrico",
"Investida",
"Chuva Borrifante"
)
val pikachu = Pokes(
"Pikachu",
"Elétrico",
"Ground",
"Surra de Cauda",
"Relâmpago"
)
val eevee = Pokes(
"Eevee",
"Normal",
"Lutador",
"Planejamento",
"Mordida"
)
val pokemon = mutableListOf(bulbasauro, charmander, squirtle, pikachu, eevee)
println("Iniciais de Kanto")
println("-----------------------------------------------------------------------------")
pokemon.forEach {
print("Nome: ${it.nome}")
print(" ")
print("Tipo: ${it.tipo}")
print(" ")
println("Fraqueza: ${it.fraqueza}")
print("Ataque Principal: ${it.atack01}")
print(" ")
println("Ataque Secundário: ${it.atack02}")
println()
}
}
data class Pokes(
val nome:String,
val tipo:String,
val fraqueza:String,
val atack01:String,
val atack02:String
)