-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllPokemon.java
More file actions
39 lines (27 loc) · 882 Bytes
/
AllPokemon.java
File metadata and controls
39 lines (27 loc) · 882 Bytes
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
import java.util.*;
public class AllPokemon {
public static ArrayList<Pokemon> getPokemon(int num){
ArrayList<Pokemon> partner = new ArrayList<Pokemon>();
if(num < 1){
return partner;
}
for(int i = 0 ; i < num ; ++i){
if(i == 0){
partner.add(new Lapras("Lapras"));
}
else if(i == 1){
partner.add(new Snorlax("Snorlax"));
}
else if(i == 2){
partner.add(new Riolu("Riolu"));
}
else if(i == 3){
partner.add(new Lucario("Lucario"));
}
else if(i == 4){
partner.add(new Giratina("Giratina"));
}
}
return partner;
}
}