equal
deleted
inserted
replaced
179 int pos; |
179 int pos; |
180 |
180 |
181 if (size < 2) |
181 if (size < 2) |
182 return; |
182 return; |
183 |
183 |
184 h1 = stack.elementAt(size - 1); |
184 h1 = stack.remove(size - 1); |
185 h2 = stack.elementAt(size - 2); |
185 h2 = stack.remove(size - 2); |
186 |
186 |
187 setPiece(h1.pos(), h1.piece()); |
187 setPiece(h1.pos(), h1.piece()); |
188 setPiece(h2.pos(), h2.piece()); |
188 setPiece(h2.pos(), h2.piece()); |
189 |
189 |
190 if (getType(h2.pos()) != EMPTY) { |
190 if (getType(h2.pos()) != EMPTY) { |
191 pos = 2 * h2.pos() - h1.pos(); |
191 pos = 2 * h2.pos() - h1.pos(); |
192 if (pos >= 0 && pos < 64) |
192 if (pos >= 0 && pos < 64) |
193 setPiece(pos, new Piece(null, null, EMPTY, 0)); |
193 setPiece(pos, new Piece(null, null, EMPTY, 0)); |
194 } |
194 } |
195 |
|
196 stack.setSize(size - 2); |
|
197 |
195 |
198 /* Reset the current player */ |
196 /* Reset the current player */ |
199 setBlacksTurn(h2.turn()); |
197 setBlacksTurn(h2.turn()); |
200 } |
198 } |
201 |
199 |