Upgraded various package dependencies in both test and main projects to their latest stable versions. Simplified the chess move computation logic by replacing custom depth handling with a streamlined `go depth` command for improved clarity and maintainability.
Updated various package references to their latest versions in the project and test files. Additionally, removed unnecessary `Aiursoft.AiurObserver.Extensions` imports from several controller files to clean up the code.
Add specific handling for ConnectionAbortedException in ChatController, GamesController, and ChallengesController to explicitly manage cases where the client closes the connection, ensuring graceful exception handling and improved code clarity.
This ensures that the pusher is only closed when it is connected, preventing unnecessary operations and potential errors. The change has been applied across ChatController, GamesController, and ChallengesController.
Replaced manual in-memory data management with LruMemoryStore for Player and Challenge models. Updated relevant methods for challenge handling to utilize the new caching mechanism for better performance and maintainability. Added Aiursoft.InMemoryKvDb package to the project.
Added package-lock.json to track exact versions of dependencies. Simplified the logic in ChessEngine to always use the best move, removing randomness based on difficulty.
The difficulty handling logic has been modified to better determine when to use the best move in the ChessEngine class. A new method called ShouldUseBestMove(int difficulty) has been added to provide a probabilistic approach towards choosing the best move based on the provided difficulty level.
Removed the randomness from the AI difficulty calculation in ChessEngine. Now the depth purely relies on the given difficulty, providing a more consistent user experience.
A change has been added to cap the difficulty level at 15 in the PveController. Allowing it to go higher could potentially cause issues. Now, when a difficulty greater than 15 is entered, it will automatically reset to 15.
Added a new difficulty level and adjusted the ranking of the "Unbeatable" level. Changes also include a minor adjustment in the calculation of the depth variable for the GetBestMove function. Comments with the old difficulty levels have been removed from both the ChessEngine service and the _Layout view.
Multiple difficulty levels have been implemented for the "Against AI" mode. This involved changes in the user interface to allow players to select the difficulty and corresponding adjustments in the game logic. Also, Artificial Intelligence behavior has been adapted according to these difficulty levels.
The chess move validation process has been updated in ChessEngine. Now the code uses the ChessBoard class to load from FEN and validate each move, before picking the best one. This change provides stronger error-checking on generated moves.
In ChessServer, the ChessBuilder function and instantiation now take parameters for the statusControl and roleControl elements. This change improves flexibility by allowing these controls to be passed in from the invoking context, rather than being statically defined within the ChessBuilder function.
Added several logging options to increase visibility of the game's internal operations. Also limited the chess engine's iterative deepening depth-first search (IDDFS) to a depth of 10 to improve performance efficiency. Additionally, changed the representation of '0' to 'O' due to notation issues in the GamesController.