Welcome to Xfaang Chess—a simple and interactive web-based chess application that features live AI commentary on your moves. Built with HTML, CSS, and JavaScript, this app provides an engaging way to play chess while receiving real-time insights generated by artificial intelligence.
- Features
- Demo
- Installation
- Usage
- Project Structure
- Technologies Used
- Contributing
- License
- Acknowledgments
- Interactive Chessboard: Play chess against an AI or another player on an intuitive and responsive chessboard.
- Live AI Commentary: Receive real-time, AI-generated comments and insights on your moves to enhance your gameplay experience.
- Move History Display: Track all moves made during the game with an easy-to-read move history log.
- Timers: Built-in chess clocks to monitor each player's time, supporting timed games.
- Responsive Design: Accessible on various devices, including desktops, tablets, and mobile phones.
- Simple Setup: No installations or plugins required—just open the app in a modern web browser.
You can try out the live version of Xfaang Chess here:
To run Xfaang Chess locally on your machine, follow these steps:
- A modern web browser (e.g., Chrome, Firefox, Edge, Safari)
- A text editor (optional, for viewing or modifying the code)
-
Clone the Repository
git clone https://github.com/xfaang/xfaang-chess.git
-
Open index.html
open index.html
-
Start the Game
- Click the "Start Game" button to begin a new game.
-
Making Moves
- Click on a chess piece to select it. Valid moves will be highlighted.
- Click on a highlighted square to move the piece.
-
Viewing AI Commentary
- After a set number of moves, AI-generated commentary will appear below the chessboard, providing insights and suggestions.
-
Tracking Move History
- The Move History section displays all moves made during the game in standard algebraic notation.
-
Using the Clocks
- Each player has a timer displayed below the board.
- The active player's clock counts down during their turn.
-
Ending the Game
- The game ends when a checkmate occurs, a player resigns, or time runs out.
- HTML5: Markup language for structuring the web page.
- CSS3: Styling and layout of the web page.
- JavaScript: Game logic, interactivity, and AI integration.
- SVG Graphics: For scalable and resolution-independent images (e.g., logo).
- Fetch API: To communicate with the AI commentary API endpoint.
- Responsive Design Techniques: Ensuring the app works well on all devices
Contributions are welcome! If you'd like to improve the app, please follow these steps:
-
Fork the Repository
Click the Fork button at the top right of the repository page to create a copy in your GitHub account.
-
Clone Your Fork
git clone https://github.com/xfaang/xfaang-chess.git
-
Create a New Branch
git commit -am "Add your commit message here"
-
Submit a Pull Request
- Go to the original repository and click on Pull Requests.
- Click on New Pull Request and select your branch to merge.
This project is licensed under the Xfaang Software License Agreement.
- Lambox: For AI language models that could power the live commentary.
- Community Contributors: Thanks to kwikiel and heapwolf contributed ideas, feedback and helped with debugging the code!
Note: This project is for educational and entertainment purposes. The AI commentary is generated to enhance the user experience and should not be considered professional chess coaching.
Feel free to reach out if you have any questions or need assistance!
- Website: Xfaang
- Email: [email protected]