forked from get-flord/Project2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClanFactory.java
More file actions
executable file
·35 lines (28 loc) · 881 Bytes
/
Copy pathClanFactory.java
File metadata and controls
executable file
·35 lines (28 loc) · 881 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
package clanmelee;
import ClanDahdoh.ClanDahdoh;
import ClanFatuova.ClanFatuova;
import ClanPeeke.ClanPeeke;
import PolichClan.PolichClan;
import clanmelee.Clan1.Clan1;
import clanmelee.Clan2.Clan2;
import java.util.ArrayList;
import java.util.Collection;
public class ClanFactory
{
/**
* This method creates an Arraylist of Clans in which it saves clans with new IDs
* so that they can be used in a Melee
* @return Collection of Clans that will be used in the Melee
*/
public Collection<Clan> getClans()
{
ArrayList<Clan> clans = new ArrayList<>();
int clanID = 0;
clans.add(new ClanPeeke(clanID++));
clans.add(new PolichClan(clanID++));
clans.add(new ClanFatuova((clanID++)));
clans.add(new RajhiClan((clanID++)));
clans.add(new ClanDahdoh((clanID++)));
return clans;
}
}