From eeaf71bc19e2b3dedb597827c1bdcbafded9d1b5 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Mon, 13 Mar 2023 20:29:36 -0700 Subject: [PATCH] Fix moving white pieces, remove sleep --- src/Board.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Board.java b/src/Board.java index 0f0e792..13ef3a5 100644 --- a/src/Board.java +++ b/src/Board.java @@ -115,12 +115,7 @@ public class Board { public void move(Move move) { move(move.from, move.to); - try { - Thread.sleep(500); - } catch(InterruptedException e) { - e.printStackTrace(); - } - draw(); + draw(new ScreenCoordinate(0, 0)); } public void undoMove() { @@ -271,6 +266,7 @@ public class Board { public ArrayList getAllLegalMoves() { ArrayList allLegalMoves = new ArrayList<>(); forEachPiece((from, piece) -> { + if (!piece.black) return; ArrayList legalTiles = piece.getLegalMoves(from, this); for (BoardCoordinate to : legalTiles) { allLegalMoves.add(new Move(from, to));