Refactor game mode scoring and win conditions

* Add overridable hooks for sunk/reaped ball handling and turn behavior.
* Implement default scoring and game-over messaging across game modes.
* Add pretty game mode names for win-condition messages.
* Update Free Ball, Last Ball, and Snooker modes to return win-condition messages.
* Move the reset button lookup to the scene root for multiplayer setup.
* Move camera controller scene to shared base UI. Move parts of it to new game_data UI node.
* Add commented test state generation for end-state testing.
This commit is contained in:
2026-08-14 03:38:04 -05:00
parent 034ba45859
commit ed6f243b93
16 changed files with 298 additions and 125 deletions

View File

@@ -41,6 +41,18 @@ var SelectedGameMode: GameModeType = GameModeType.FREE_BALL
func _init() -> void:
Globals.game_data = self
func get_mode_pretty() -> String:
match game_mode:
"8ball":
return "8-Ball"
"9ball":
return "9-Ball"
"snooker":
return "Snooker"
"freeball":
return "Free Ball"
_:
return ""
@rpc("authority", "reliable")
func set_game_address(address: String) -> void: