diff --git a/Systems/FairyStockfish/ServerManager.gd b/Systems/FairyStockfish/ServerManager.gd index a4b444a..70e680a 100644 --- a/Systems/FairyStockfish/ServerManager.gd +++ b/Systems/FairyStockfish/ServerManager.gd @@ -154,7 +154,6 @@ func _on_request_timeout(): # Clean up timer request_timer.queue_free() request_timer = null - # Call your secondary processing function here write_log("HTTP Request failed, starting server process") write_log(server_path + "/index.js") server_process_id = OS.create_process("node", [server_path + "/index.js"]) diff --git a/Systems/Game/Game.gd b/Systems/Game/Game.gd index b2156d9..481fa5d 100644 --- a/Systems/Game/Game.gd +++ b/Systems/Game/Game.gd @@ -1,54 +1,37 @@ class_name Game extends Node -# This script can be attached to your main Game node that contains both -# the menu and the chess game components @onready var menuContainer = $MenuContainer @onready var chessGame = $ChessGame @onready var stateMachine = $StateMachine func _ready(): - # Show menu on startup if menuContainer: menuContainer.visible = true - # Hide chess game initially if chessGame: chessGame.visible = false - # Connect menu signals if menuContainer and menuContainer.has_signal("new_game_requested"): menuContainer.connect("new_game_requested", Callable(self, "_on_new_game_started")) func _on_new_game_started(): print("Starting new game...") - # Show chess game if chessGame: chessGame.visible = true - # You can add additional game initialization logic here if needed - # For example, configuring game options based on menu selections - # Ensure the chess game is properly initialized if !chessGame.is_inside_tree(): await chessGame.ready - # Start game logic _start_game_logic() func _start_game_logic(): - # If StateMachine is already initialized in the Chess game, this may not be needed if stateMachine and stateMachine.has_method("transitionToNextState"): stateMachine.transitionToNextState(Constants.WHITE_TURN) - # Add any additional game start logic here - - # If you need to open a specific scene or create nodes dynamically: - # var chess_scene = load("res://Scenes/ChessGame.tscn").instantiate() - # add_child(chess_scene) -# Handle escape key to show menu during game func _unhandled_input(event): if event is InputEventKey: if event.pressed and event.keycode == KEY_ESCAPE: @@ -58,7 +41,5 @@ func _toggle_menu(): if menuContainer: menuContainer.visible = !menuContainer.visible - # Optional: Pause game when menu is visible if menuContainer.visible and chessGame: - # You might want to pause the game or disable input pass \ No newline at end of file diff --git a/Systems/Game/Map/DotPatternGenerator.gd b/Systems/Game/Map/DotPatternGenerator.gd index 89e4f4e..90155c5 100644 --- a/Systems/Game/Map/DotPatternGenerator.gd +++ b/Systems/Game/Map/DotPatternGenerator.gd @@ -103,7 +103,6 @@ func distance_to_line_segment(point: Vector2, line_start: Vector2, line_end: Vec # Return distance from point to projection return (point - projection).length() -# Call this when the map changes to update dot highlights func update_dots(): if highlight_dots and map_screen != null: generate_dots() diff --git a/Utils/Utils.gd b/Utils/Utils.gd index dae9584..5d77a1c 100644 --- a/Utils/Utils.gd +++ b/Utils/Utils.gd @@ -35,7 +35,6 @@ static func convert_algebraic_to_location(square: String) -> String: file_num = file_num var rank_num = 8 - rank - # Return location in your game's format return "%d-%d" % [file_num, rank_num]