|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Game
contains the logic and rules of a game. IT should not
contain any Event(s) of EventHandlers.
In a MVC, this would be the model.
Method Summary | |
int |
getCurrentTurn()
Gets the seat of the current turn. |
int |
getLeader()
Gets the seat of the Player that started this round. |
int |
getNumberOfPlayersPerTeam()
Gets the number of players per team. |
int |
getNumberOfSeats()
Gets the number of players needed before a StartRoundEvent is sent. |
int |
getNumberSeated()
Gets the number of players currently seated. |
net.mlw.gfw.ext.basic.server.Player |
getPlayerSeatedAt(int seat)
Gets the player seated in the given seat. |
int |
getSeatOfPlayer(java.lang.String userName)
Gets the seat index of the player. |
void |
setCurrentTurn(int turn)
Sets the seat of the current turn. |
void |
setLeader(int leader)
|
void |
setPlayerSeatedAt(net.mlw.gfw.ext.basic.server.Player player,
int seat)
Sets a player to a given seat. |
Method Detail |
public int getNumberOfSeats()
StartRoundEvent
is sent.
public int getNumberSeated()
public net.mlw.gfw.ext.basic.server.Player getPlayerSeatedAt(int seat)
seat
- The seat the player is siting in.
java.lang.IndexOutOfBoundsException
- if an invalid seat is passed.public void setPlayerSeatedAt(net.mlw.gfw.ext.basic.server.Player player, int seat)
player
- The player.seat
- The seat the player is siting in.
java.lang.IndexOutOfBoundsException
- if an invalid seat is passed.
SeatTakenException
- is the seat is already taken.public int getCurrentTurn()
public void setCurrentTurn(int turn)
turn
- The seat of the current turn.public int getLeader()
public void setLeader(int leader)
public int getSeatOfPlayer(java.lang.String userName)
userName
-
public int getNumberOfPlayersPerTeam()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |