Exemple #1
0
 /**
  * Returns the MoveDouble associated with this SaveMoveDouble.
  *
  * @return the MoveDouble associated with this SaveMoveDouble.
  */
 @Override
 public Move move() {
   if (moves.size() < 2) return null;
   SaveMoveTicket move1 = moves.get(0);
   SaveMoveTicket move2 = moves.get(1);
   MoveDouble move =
       MoveDouble.instance(
           Colour.valueOf(super.colour), (MoveTicket) move1.move(), (MoveTicket) move2.move());
   return move;
 }
Exemple #2
0
 /**
  * Returns the MoveTicket associated with this SaveMoveTicket.
  *
  * @return the MoveTicket associated with this SaveMoveTicket.
  */
 @Override
 public Move move() {
   MoveTicket move =
       MoveTicket.instance(Colour.valueOf(super.colour), Ticket.valueOf(ticket), target);
   return move;
 }
Exemple #3
0
 /**
  * Returns the MovePass associated with this SaveMovePass.
  *
  * @return the MovePass associated with this SaveMovePass.
  */
 @Override
 public Move move() {
   return MovePass.instance(Colour.valueOf(super.colour));
 }
Exemple #4
0
 /**
  * Constructs a new SaveMove object.
  *
  * @param colour the colour of the player to whom this move belongs.
  */
 public SaveMove(Colour colour) {
   this.colour = colour.toString();
 }