forked from stjpm09/ClassMelee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Clan.java
executable file
·44 lines (38 loc) · 1019 Bytes
/
Clan.java
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
package clanmelee;
import java.util.Collection;
/**
* A factory that produces ClanMember objects for one particular clan
*/
public abstract class Clan {
private final String clanName;
private final int clanID;
/**
* Constructor
*
* @param clanName name of the clan
* @param clanID the clan's unique ID
*/
public Clan(String clanName, int clanID) {
this.clanName = clanName;
this.clanID = clanID;
}
/**
* get the ID passed to the constructor
*/
public int getClanID() {
return clanID;
}
/**
* get the name passed to the constructor
*/
public String getClanName() {
return clanName;
}
/**
* Concrete clans implement this factory method to produce clan members
*
* @param hitPoints the number of hit points to be distributed amongst all the clan members
* @return the clan's members
*/
public abstract Collection<ClanMember> getClanMembers(int hitPoints);
}