FileDocCategorySizeDatePackage
ChessMoveEvent.javaAPI DocExample941Tue Jan 20 21:46:50 GMT 1998dcj.examples.message

ChessMoveEvent

public 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 ChessMovegetMove()

 return move; 
public intgetType()

 return type; 
public voidsetConfirm()

 type = CONFIRM; 
public voidsetMove(ChessMove m)

 move = m; 
public voidsetReject()

 type = REJECT; 
public voidsetSubmit()

 type = SUBMIT;