feat: Introduce modular player system with dedicated managers for movement, race, input, playerboard, actions, special tiles, and powerups, along with a new main scene and documentation.

This commit is contained in:
2025-12-16 02:37:26 +08:00
parent 96f5754f99
commit e41ffcfb67
9 changed files with 494 additions and 146 deletions
+9 -1
View File
@@ -34,6 +34,12 @@ func get_ordinal_string(number: int) -> String:
# Goal Pattern Matching (Core Functionality)
# =============================================================================
func _normalize_tile(tile: int) -> int:
"""Convert holo tiles (11-14) to normal tiles (7-10) for goal comparison."""
if tile >= 11 and tile <= 14:
return tile - 4
return tile
func check_3x3_section(board: Array, goals_pattern: Array, start_row: int, start_col: int) -> bool:
for i in range(3):
for j in range(3):
@@ -45,7 +51,9 @@ func check_3x3_section(board: Array, goals_pattern: Array, start_row: int, start
for i in range(3):
for j in range(3):
if goals_pattern[i][j] != -1:
if board[start_row + i][start_col + j] != goals_pattern[i][j]:
# Normalize board value to treat holo tiles (11-14) same as normal (7-10)
var normalized_board = _normalize_tile(board[start_row + i][start_col + j])
if normalized_board != goals_pattern[i][j]:
return false
return true