|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectrolec.Players
public class Players
This class represents the group of players in a game of Frank's Zoo
| Constructor Summary | |
|---|---|
Players(int p)
Constructs a new group of Players |
|
Players(int p,
int[] o)
Constructs a new group of Players that take turns in a specific order |
|
| Method Summary | |
|---|---|
void |
addPlayer(Player p)
Adds a player to the group of players |
Player |
first()
Returns the player who starts |
int[] |
getOrder()
Returns the order in which players take turns |
Player |
next(Player p)
Returns the player next to a specific player |
Player |
player(int i)
Returns a specific Player |
int |
size()
Returns the number of players |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Players(int p)
public Players(int p,
int[] o)
p - the number of playerso - the order in which the players take turns| Method Detail |
|---|
public Player player(int i)
i - the ID of the player to be returned
public void addPlayer(Player p)
p - the player to be addedpublic int size()
public Player next(Player p)
public Player first()
public int[] getOrder()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||