ChessMoveEventpublic class ChessMoveEvent extends EventObject Source code from "Java Distributed Computing", by Jim Farley.
Class: ChessMoveEvent
Example: 6-16
Description: A chess move "message" implemented as a Java event. |
Fields Summary |
---|
ChessMove | move | int | type | public static final int | SUBMIT | public static final int | CONFIRM | public static final int | REJECT |
Constructors Summary |
---|
public ChessMoveEvent(ChessMove subject, ChessPlayer src)
super(src);
move = subject;
type = SUBMIT;
|
Methods Summary |
---|
public ChessMove | getMove() return move;
| public int | getType() return type;
| public void | setConfirm() type = CONFIRM;
| public void | setMove(ChessMove m) move = m;
| public void | setReject() type = REJECT;
| public void | setSubmit() type = SUBMIT;
|
|