Our project is named "csu33012-2425-project07" but is found at the URL "https://gitlab.scss.tcd.ie/csu33012-2425-group07/chessgame"
https://media.heanet.ie/secure/file/9ddd6a470b4643fea9499c5287488c64
ChessGame is a group project (Group 07) for Software Engineering. It features a dynamic chessboard game built with React and leverages the react-chessboard library for board visualization. It also uses the Stockfish API (External Service) for the AI opponent that the user plays each time. This application includes user authentication, game state management, player statistics tracking, and an AI/CPU opponent.
To set up the ChessGame project locally, you need to install the required dependencies:
-
Clone the repository: git clone https://gitlab.scss.tcd.ie/csu33012-2425-group07/chessgame.git cd chessgame
-
Install dependencies: Frontend: Install Node.js npm install react npm install axios
- (If running frontend tests) npm install axios@0.21.1 npm install --save-dev babel-jest @babel/preset-env @babel/preset-react npm install --save-dev @babel/plugin-proposal-private-property-in-object npm install react-chessboard npm install --save-dev jest
Backend: Download Apache Maven 3.9.9 and add the bin folder to your PATH Ensure Java21 is installed and added to your PATH
TESTS:
- FRONTEND: After installing the above, to run front-end tests, either:
- (ON VSCODE) navigate to "chessgame\frontend\frontend\src_tests_\frontend.test.js" and use the Jest extension to run given tests.
OR
- (ON POWERSHELL) Change directory to "chessgame\frontend\frontend" and run "npm test".
- BACKEND: Tests for the Chess Game Engine Controller and User Repository (database) can be found at 'chessgame\backend\chess-backend\src\test\java\com\chessgame\chess_backend\controller'. -> They can be run using ChessBackendApplcationTests.java or by running "mvn test" in a terminalg anywhere in the backend directory.
-
Run application Do both of:
-
Frontend: From ./chessgame, change directory with cd frontend/frontend -> Then execute "npm start"
-
Backend: From ./chessgame, change directory with cd backend/chessbackend -> Then execute "./mvnw spring-boot:run"
-
- User Login/Registration: Authenticate using the login or registration form.
- Chess Gameplay: Play a game of chess with full game state tracking.
- Game Info Sidebar: View player statistics (wins, losses, and win ratio).
- Navigate to the home page:
/
. - Login or Register to access gameplay.
- Start a new game and monitor progress via the sidebar.
Planned features and improvements:
- Online Multiplayer: Allow users to play against other online players.
- Matchmaking: Add user ranking and skill-based matchmaking.
- Game History: View past games and analyze moves.