ta bort developer-move

This commit is contained in:
loveb 2022-05-12 22:44:19 +02:00
parent 3a9d90ed0d
commit 0ef41665d1
2 changed files with 527 additions and 177 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,6 @@ public class Board extends JPanel implements MouseListener {
private ArrayList<Point> validMovesToDraw = new ArrayList<>();
private Point selectedPiece = new Point();
private final Color moveableColor = new Color(255, 191, 0);
public boolean developerMode = false;
short turnCount = 0;
private boolean whitesTurn = true;
@ -181,7 +180,7 @@ public class Board extends JPanel implements MouseListener {
final Piece selectedPiece = pieces[mouseCoordinateX][mouseCoordinateY];
// Kolla endast ifall vi kan röra pjäsen om det är samma färg som den tur vi är
if (selectedPiece.isWhite() == whitesTurn || developerMode) {
if (selectedPiece.isWhite() == whitesTurn) {
ArrayList<Point> attacks = checkAttacks(whitesTurn);
ArrayList<Point> validMoves = selectedPiece.validMoves(pieces, true);