Commit Graph

460 Commits

Author SHA1 Message Date
Anduin Xue d37df1970a Improve game visibility and adjust search depth
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.
2024-07-02 12:23:26 +00:00
dvorak chen d70961f31d Merge branch chessserver:master into refactor-dv 2024-07-02 12:14:48 +00:00
dvorak chen 54ed2c2b27 Merge branch chessserver:master into master 2024-07-02 12:14:39 +00:00
Anduin Xue 1c36398f38 Update script reference in _Layout.cshtml
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.
2024-07-02 11:58:15 +00:00
Anduin Xue 8143eea15f Refactor PveController in ChessServer module
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.
2024-07-02 11:56:33 +00:00
Anduin Xue 7be9d758d1 Reduce search depth and fix turn-checking method
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.
2024-07-02 11:55:26 +00:00
Anduin Xue 8047201b4b Add computer player interaction in PveController
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.
2024-07-02 11:43:44 +00:00
Anduin Xue 264f64c21b Integrate AI chess engine and player vs AI functionality
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.
2024-07-02 11:39:05 +00:00
dvorakchen 8961cd2dce chore: remove unnecessary 2024-07-02 16:45:21 +08:00
dvorak chen dc63112dde Merge branch chessserver:master into refactor-dv 2024-07-02 08:42:19 +00:00
dvorakchen 206ce92ed5 refactor: chessboard.js 2024-07-02 16:37:30 +08:00
dvorak chen 6bb879c52a Merge branch chessserver:master into master 2024-07-02 03:20:42 +00:00
Anduin Xue db02d640e8 Use sudo to run docker because rootless docker may be provided by docker desktop and runs in VM, which has problem of pass through devices. 2024-07-01 17:08:02 +00:00
dvorak chen e95e0585a5 Merge branch chessserver:master into master 2024-07-01 12:44:49 +00:00
Anduin Xue e97924cf15 Merge branch 'users/nugetninja/evergreen' into 'master'
Auto dependencies upgrade by bot.

See merge request aiursoft/chessserver!63
2024-06-30 06:01:16 +00:00
Nuget Ninja 7f9aeed42d Auto csproj fix and update by bot. 2024-06-30 05:01:16 +00:00
dvorakchen 2f8c7994b3 feat: add track 2024-06-26 16:29:48 +08:00
Anduin Xue 292bec5004 Update README.md 2024-06-23 16:29:05 +00:00
Anduin b2a4a7a788 Merge branch 'master' of ssh://gitlab.aiursoft.cn:2202/aiursoft/chessserver 2024-06-23 16:10:20 +00:00
Anduin 54ed8c4fce Update navbar brand URL 2024-06-23 16:10:19 +00:00
Anduin Xue 9bc8fb4701 Merge branch 'master' into 'master'
feat: display name who sent message

See merge request aiursoft/chessserver!60
2024-06-23 14:17:27 +00:00
dvorakchen 8fa8544d7b feat: display name who sent message 2024-06-23 21:11:23 +08:00
Anduin 1e6eaea80f Update navbar brand URL
The navbar brand URL in _Layout.cshtml was updated. The previous link pointed to "https://home.aiursoft.cn". This has been changed to point to "https://www.aiursoft.cn" instead.
2024-06-23 10:52:45 +00:00
Anduin d8a67cb9b0 Add icons to navbar links and player name
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.
2024-06-23 10:37:42 +00:00
Anduin 987a969e29 Add Font Awesome package to ChessServer
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.
2024-06-23 10:28:59 +00:00
Anduin Xue 0ccb5a50cd Merge branch 'master' into 'master'
fix: scroll behavior

See merge request aiursoft/chessserver!59
2024-06-23 07:31:42 +00:00
dvorakchen c61c500427 feat: change scroll behavior 2024-06-23 14:11:14 +08:00
dvorakchen 56b3d218e6 fix: scroll problem on mobile 2024-06-23 14:00:51 +08:00
Anduin 7ad82ab2ad Merge remote-tracking branch 'origin/master' 2024-06-22 09:17:29 +00:00
Anduin c03f9d484e Add Font Awesome CSS to layout
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.
2024-06-22 09:17:26 +00:00
Anduin Xue 831c3adac2 Merge branch 'master' into 'master'
fix: chat message text color

See merge request aiursoft/chessserver!58
2024-06-21 15:36:18 +00:00
dvorak chen 568ef64cfc Merge branch chessserver:master into master 2024-06-21 15:28:04 +00:00
dvorakchen 4d698616e8 fix: chat color 2024-06-21 23:27:32 +08:00
Anduin Xue e15b2e7f99 Update README.md 2024-06-21 15:20:39 +00:00
Anduin dc33989ef7 Refactor drag-start logic in chessboard.js
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.
2024-06-21 14:46:57 +00:00
Anduin e50b551260 Add game over check to chessboard script
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.
2024-06-21 14:41:17 +00:00
Anduin e0a8a833f2 Limit onMouseoverSquare function to the current player's turn
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.
2024-06-21 14:30:48 +00:00
Anduin f8b37c1fcb Update Send button styling in chat component
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.
2024-06-21 14:29:50 +00:00
Anduin 98f5a412be Refactor classes into separate files
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.
2024-06-21 14:01:05 +00:00
Anduin 8001031a22 Refactor chat feature and add websockets support
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.
2024-06-21 14:00:18 +00:00
Anduin Xue 06d748814b Merge branch 'chat-dv' into 'master'
feat: chat

See merge request aiursoft/chessserver!57
2024-06-21 10:03:29 +00:00
dvorakchen c6df42d12d ffix: lint error 2024-06-21 18:00:31 +08:00
dvorak chen 8de10e3526 Merge branch chessserver:master into chat-dv 2024-06-21 09:48:02 +00:00
dvorakchen 971aad6e63 feat: chat
it just static now
2024-06-21 17:46:11 +08:00
Anduin Xue babdfb76c9 Merge branch 'aimer-enhacement' into 'master'
Highlight Legal Moves

See merge request aiursoft/chessserver!56
2024-06-20 16:40:23 +00:00
Aimer Neige 743c8df063 Highlight Legal Moves 2024-06-20 16:40:23 +00:00
Anduin Xue f9062d2af0 Merge branch 'master' into 'master'
disable overscroll-behavior

See merge request aiursoft/chessserver!55
2024-06-20 09:13:17 +00:00
dvorak chen 150f0b2bd7 Merge branch chessserver:master into master 2024-06-20 09:08:22 +00:00
dvorakchen 47a62085e0 feat: disable overscroll-behavior 2024-06-20 17:07:41 +08:00
xuef 1f04695351 Merge branch 'master' of ssh://gitlab.aiursoft.cn:2202/aiursoft/chessserver 2024-06-20 07:57:31 +00:00