ChessBuilder/Systems/StateMachine/GameStates/CleanupPhase.gd

11 lines
No EOL
380 B
GDScript

extends "res://Systems/StateMachine/ChessGameState.gd"
func enter(_previous: String, data := {}) -> void:
print("ENTERING STATE ", Constants.CLEANUP, data)
if "endCondition" in data:
finished.emit(Constants.ROUND_END)
elif game.currentPlayer == game.WHITE:
finished.emit(Constants.BLACK_TURN)
else:
finished.emit(Constants.WHITE_TURN)