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.