|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
| Method Summary | |
boolean |
fourWins()
Tests if a player has won. |
int |
setChip(int column,
byte colour)
Sets a token of a certain player into a column of the board. |
java.lang.String |
toString()
Gives a String represntation of the complete board. |
| Method Detail |
public int setChip(int column,
byte colour)
column - The column where to set the token. It is in
the range 1<=column<=Constants.COLUMNS.colour - One of the colour
constants: Constants.PLAYERONE and Constants.PLAYERTWO.
public boolean fourWins()
public java.lang.String toString()
| | | | | | | | --------------- | | | | | | | | --------------- | | | |x|x| | | --------------- | | | |o|o| | | --------------- | | | |x|o| | | --------------- | | |x|o|o|x| | ---------------
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||