This project is a complete interactive game of the Raumschach variant of 3D Chess and was made as our ICS4U summative. Users may choose to play against an AI with 3 difficulty levels or with another player locally. The rules of the game may be found here.
Play our game at: https://edweenie123.github.io/3D-Chess/
- 4 different game modes (PvP + 3 AI difficulties)
- UI to select pieces for pawn promotions
- Highlights to show legal moves and the opponent’s last move
- Game history
- Panel showing piece captures of each side
- Game evaluation bar
The move logic, checkmate+stalemate detection and AI were all programmed in C++ and were compiled to WebAssembly using Emscripten so that it could be run on the browser. The visual interface of the game was made using vanilla JavaScript, HTML and CSS.
Our chess AI was made from scratch and uses the minimax algorithm with alpha-beta pruning for optimization.
To install and run the game locally:
- Clone the repository
git clone https://github.com/edweenie123/3D-Chess.git
- Serve index.html on port 8080 by running the following command in the project root directory
NB: This step requires Python 3 to be installed
sh serve.sh
- Play the game on the browser at http://localhost:8080/