|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.bluebones.tictactoe.Move
public class Move
Represents a move in a game of tic-tac-toe.
Field Summary | |
---|---|
byte |
x
x-coordinate this move takes place at |
byte |
y
y-coordinate this move takes place at |
Constructor Summary | |
---|---|
Move(byte x,
byte y,
byte color)
Creates a move with the specified coordinates for the specified player. |
Method Summary | |
---|---|
byte |
color()
Gets the type of piece placed by this move. |
String |
toString()
Gets a human-readable String representation of this move. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte x
public byte y
Constructor Detail |
---|
public Move(byte x, byte y, byte color)
x
- int
x-coordinate of this move.y
- int
y-coordinate of this move.color
- int
type of piece played by this player
(either TicTacToe.NOUGHTS
or
TicTacToe.CROSSES
)Method Detail |
---|
public byte color()
int
, either TicTacToe.NOUGHTS
or
TicTacToe.CROSSES
public String toString()
String
representation of this move.
toString
in class Object
String
representation of this move.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |