/** * 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; }
/** * Returns the next saved move in the game. * * @return the next saved move in the game. */ public Move getSavedMove() { SaveMove sMove = savedMoves.get(0); Move move = sMove.move(); savedMoves.remove(0); return move; }