major refactor(game-modes): centralize scoring and turn handling
* Move common ball recording, scoring, and turn-switching logic into `BaseMode` * Add hooks for mode-specific ball handling and turn behavior * Simplify 8-ball and 9-ball modes to use `LastBallMode` * Update Snooker to use the new ball-processing hooks * Remove duplicated scoring and turn-management code
This commit is contained in:
@@ -21,5 +21,5 @@ func _balls_stopped_moving() -> void:
|
||||
mode.handle_switch_user()
|
||||
|
||||
func set_mode(game_mode) -> void:
|
||||
mode = Globals.game_data.GameMode.get(game_mode).new()
|
||||
mode = Globals.game_data.GameMode.get(game_mode).new()
|
||||
mode.ball_states = mode.generate_ball_states()
|
||||
|
||||
Reference in New Issue
Block a user