fixed board reset

This commit is contained in:
2ManyProjects 2025-01-26 21:09:39 -06:00
parent 4f00d01f82
commit b5b2b977ad
2 changed files with 4 additions and 4 deletions

View file

@ -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("-")

View file

@ -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)