--- a/org/homelinux/largo/games/board/checkersboard/CheckersBoard.java
+++ b/org/homelinux/largo/games/board/checkersboard/CheckersBoard.java
@@ -181,8 +181,8 @@
if (size < 2)
return;
- h1 = stack.elementAt(size - 1);
- h2 = stack.elementAt(size - 2);
+ h1 = stack.remove(size - 1);
+ h2 = stack.remove(size - 2);
setPiece(h1.pos(), h1.piece());
setPiece(h2.pos(), h2.piece());
@@ -193,8 +193,6 @@
setPiece(pos, new Piece(null, null, EMPTY, 0));
}
- stack.setSize(size - 2);
-
/* Reset the current player */
setBlacksTurn(h2.turn());
}