fixed board reset
This commit is contained in:
parent
4f00d01f82
commit
b5b2b977ad
2 changed files with 4 additions and 4 deletions
|
|
@ -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("-")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue