From 116bebbe6058532b3a04741bfd55cd4e59f1d05a Mon Sep 17 00:00:00 2001 From: zachartrand <80857317+zachartrand@users.noreply.github.com> Date: Mon, 29 Mar 2021 22:12:41 -0400 Subject: [PATCH] Bug fix Fixed animation bug where Rooks would travel across the board when castling. --- chess_main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chess_main.py b/chess_main.py index 5d54d09..be04d86 100644 --- a/chess_main.py +++ b/chess_main.py @@ -73,7 +73,7 @@ def main(): playerClicks = [] # Keep track of player clicks # (two tuples: [(4, 6), (4, 4)] would be (e2 pawn to) e4) gs.upside_down = False - humanWhite = False # True if human player is white. + humanWhite = True # True if human player is white. humanBlack = True # True if human player is black. if humanBlack and not humanWhite: gs.upside_down = True @@ -415,9 +415,9 @@ def animateMove(move, validMoves, undo=False): (rookStartFile, rookStartRank) = ( FLIPPEDBOARD[rookStartFile], FLIPPEDBOARD[rookStartRank] ) - (rookEndFile, rookEndRank) = ( - FLIPPEDBOARD[rookEndFile], FLIPPEDBOARD[rookEndRank] - ) + (rookEndFile, rookEndRank) = ( + FLIPPEDBOARD[rookEndFile], FLIPPEDBOARD[rookEndRank] + ) dRookFile = rookEndFile - rookStartFile dRookRank = rookEndRank - rookStartRank rookEndSquareColor = rookEndSquare.get_color()