|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcontroller.Player
public class Player
ADT Player describes the characteristics of a player and provides modification methods.
| Constructor Summary | |
|---|---|
Player(java.lang.String x,
boolean z)
constructor: Constructs a new Player with the given parameter String and Color. |
|
| Method Summary | |
|---|---|
boolean |
getColor()
accessor(selector): Returns the Color of the Player. |
java.lang.String |
getName()
accessor(selector): Returns the name of the Player. |
boolean |
getTurn()
accessor(selector): Returns a boolean value on whether a Player can or cannot play. |
void |
setTurn(boolean what)
transformer(mutative): Is responsible for assigning whether its a Player's Turn. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Player(java.lang.String x,
boolean z)
x - Is the parameter String name of the Player.z - Is the Color of the Player's pieces'(true for white,false for black).
java.lang.IllegalArgumentException - If x is empty.
java.lang.NullPointerException - If x is null.| Method Detail |
|---|
public boolean getColor()
public void setTurn(boolean what)
what - to assign on whether it's a Player's turn. True if it is, false otherwise.public boolean getTurn()
public java.lang.String getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||