/** * Returns true if there are saved moves available, false otherwise. * * @return true if there are saved moves available, false otherwise. */ public boolean hasSavedMove() { if (savedMoves == null) { savedMoves = moves; moves = new ArrayList<SaveMove>(); } return savedMoves.size() > 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; }