diff --git a/Systems/Game/ChessGame.gd b/Systems/Game/ChessGame.gd index 4d720c6..06e82db 100644 --- a/Systems/Game/ChessGame.gd +++ b/Systems/Game/ChessGame.gd @@ -280,7 +280,8 @@ func isValidMove(location: String) -> bool: func resetBoard() -> void: - clearBoard(); + clearSelection() + clearBoard() setupPieces() Turn = 0 currentPlayer = WHITE @@ -288,6 +289,8 @@ func resetBoard() -> void: p1String.text = str(p1Points) p2Points = 0 p2String.text = str(p2Points) + gamecheckMate = false; + gamedraw = false; areas.clear() specialArea.clear() @@ -362,7 +365,6 @@ func resolveMoveEffects() -> void: func resetHighlights(): for button in boardContainer.get_children(): - print(button.name) if !button.name.contains("-"): continue var coord = button.name.split("-") diff --git a/Systems/StateMachine/GameStates/RoundEnd.gd b/Systems/StateMachine/GameStates/RoundEnd.gd index f31c6c8..49ea491 100644 --- a/Systems/StateMachine/GameStates/RoundEnd.gd +++ b/Systems/StateMachine/GameStates/RoundEnd.gd @@ -9,8 +9,6 @@ func enter(_previous: String, data := {}) -> void: "draw": handleDraw() - # Reset state for next round - game.clearSelection(); game.resetBoard() finished.emit(Constants.WHITE_TURN)