home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / dxma.exe / DXMA05.cab / samples / da / java / apps / chess / Move.java < prev    next >
Encoding:
Java Source  |  1997-11-13  |  725 b   |  31 lines

  1. // class : Move
  2. // this class stores all the information nessecary for a single move.
  3. // a list of this is used to specify a game.
  4.  
  5.  
  6. public class Move 
  7. {
  8.   Move() {}
  9.   // where we're moving from
  10.   public int xFrom = -1;
  11.   public int yFrom = -1;
  12.   // where we're moving to
  13.   public int xTo = -1;
  14.   public int yTo = -1;
  15.   // any piece we've captured in this move
  16.   public int xCapture = -1;
  17.   public int yCapture = -1;
  18.   // do we promote a piece?
  19.   public int promote = -1;
  20.   // info about castling
  21.   public int xFrom2 = -1;
  22.   public int yFrom2 = -1;
  23.   public int xTo2 = -1;
  24.   public int yTo2 = -1;
  25.   // which player is making this move
  26.   public int player = 0;
  27.  
  28.   public String result = null;
  29. }
  30.  
  31.