|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Caretaker
This class handles button clicks to save/restore snapshots. This class also serves as a caretaker of a snapshot of the Othello's board.
Constructor Summary | |
Caretaker(Board board)
Construct this ActionListener of the save and restore buttons and caretaker of the board snapshot. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
The action performed by the ActionListener. |
Board.Snapshot |
load()
Load and return a saved snapshot of a board of Othello. |
void |
save(Board.Snapshot state)
Save a snapshot of a board of Othello. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public Caretaker(Board board)
board
- The board of the game of Othello.Method Detail |
public void actionPerformed(java.awt.event.ActionEvent event)
event
- The action event this listener listens to.public Board.Snapshot load()
public void save(Board.Snapshot state)
object
- The snapshot to be saved.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |