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.
The script reference to layout.js in the _Layout.cshtml file was updated by adding an "asp-append-version" attribute. This will ensure a fresh copy of the script is loaded by appending a version query parameter to the URL, useful for cache busting.
Unused 'System.Drawing' import is removed and unnecessary variable creations are eliminated in PveController. Especially, the acceptedChallenge variable and the board variable within fen changes subscription logic are omitted to make the code cleaner and more efficient.
The search depth for the iterative deepening depth-first search (IDDFS) in the ChessEngine has been reduced for performance reasons. In addition, the method for checking whose turn it is in the PveController has been altered. This now checks the color of the pieces, rather than looking up the player's ID, yielding more accurate results.
A new section for adding a computer player has been implemented in PveController. This enhancement includes creating a challenge, letting the computer accept the challenge, and allowing the computer to respond to the player's move. Additionally, the delay for the UI update has been increased and a redirect to the game page is included.
Added new ChessEngine service as a singleton and integrated "LynxChess.Lynx" package. A new "Against AI" button is included in the layout. Player's ID is now appened to the "Against AI" button link. Created a new controllers, PveController, to handle interactions in Player versus AI mode.
Added two font awesome icons to the navbar links 'Rooms' and 'Watch'. Icon for player name also added in the layout.js file. This gives a more visual and interactive touch to the action links and personalizes the player name link.
A new package '@fortawesome/fontawesome-free' has been added to Aiursoft.ChessServer's package.json. This inclusion will allow for more extensive use of icons and improve the overall user interface experience.
A link to the Font Awesome CSS library has been added to the layout. This update will make Font Awesome icons available across the application views, improving the user interface design options.