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.
The drag-start logic in the chessboard.js file was changed for simplification. The onMouseoverSquare function was removed and its functionality was moved into the onDragStart function. In addition to that, variable and argument names were also modified to increase readability.
An additional check has been added to the chessboard.js script in the ChessServer application. This check ensures that if the game is over, no further moves are allowed to be made, improving the game flow and overall user experience.
This code change ensures that mouseover triggers on chess pieces only work for the player whose turn it is currently. The function onMouseoverSquare now has a condition that returns nothing if the game's turn does not match the player's color.
A change has been made to the styling of the "Send" button in the chat component to include rounded corners. The update provides a softer aesthetic to the button, improving the visual appearance and user experience.
Moved AcceptedChallenge, ChatMessage, and ChatMessageResponse classes to individual files from Challenge.cs. This change enhances the organization and readability of the code, allowing each class definition to reside in its own dedicated file.
The chat feature in the Chess Server web application is now refactored to use WebSockets, allowing real-time communication between players during a game. The message display logic has been moved to a separate script file, and a ChatController handles incoming WebSocket connections. This update has drastically improved chat interactivity and real-time performance.