olufjen / chess

Programs to utilize chess ontologies, and play games of chess
1 stars 0 forks source link

Removing own pieces #7

Closed olufjen closed 4 years ago

olufjen commented 4 years ago

In the chessstate mark method: This creates problems: // game.movePiece(piece.getMyPosition().getXyloc(),position.getXyloc()); // Performes the move: // The piece is moved to the new location on the chessboard held by the AbstractChessGame Position heldPosition = piece.getHeldPosition(); // Changed from getMyposition OLJ 2.03.20 // Position heldPosition
if (heldPosition == null) heldPosition = piece.getMyPosition(); game.getGamePlayer().createMove(piece, heldPosition, position,movements); // Creates a local list of movements localAction.getActions(playerTomove); // Added 24.02.20 When a move has been made then the pieces belonging to the same player must get new

It removes own pieces from the board.