|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--TicTacToePlayer
Tic-Tac-Toe Game:
A Player
object represents a player in a grid-based
game that acts in response to mouse clicks in the grid.
Constructor Summary | |
TicTacToePlayer(java.lang.String label,
java.awt.Color color)
Constructs a tic-tac-toe player with the specified label ("O" or "X"). |
Method Summary | |
boolean |
respondToMousePress(edu.kzoo.grid.Grid grid,
edu.kzoo.grid.Location loc)
Responds to mouse press at the specified location in the specified grid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TicTacToePlayer(java.lang.String label, java.awt.Color color)
label
- the label for this player ("X" or "O")color
- the color to use when displaying the labelMethod Detail |
public boolean respondToMousePress(edu.kzoo.grid.Grid grid, edu.kzoo.grid.Location loc)
respondToMousePress
in interface Player
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |