Skip to content

BlessedSiden1234/ChessGame

Repository files navigation

♟️ Chess World

Chess World is a lightweight Flask-based chess game that supports both single-player (AI) and online multiplayer play.
It includes one custom engine named DevZero (where dev stands for developer and zero follows a tradition in engines like AlphaZero and LeelaZero), created by me, along with three additional UCI-compatible chess engines for learning purposes:

  • Stockfish
  • CDRill
  • Deuterium

The game features a built-in assistant that provides an introduction, instructions, credits, and in-game alerts, such as:

  • Check
  • Checkmate
  • Stalemate

You can play with a friend over the internet using port forwarding or ngrok, making the game easily accessible on two different devices.

⚠️ Note: The server does not enforce strict move permissions in online mode, so any connected player can make a move at any time.


🚀 Quick Start

Install

Clone the repository:

git clone https://github.com/BlessedSiden1234/ChessGame

# Requirements
You can run the `setup.py` by which all the modules will be downloaded automatically by pip:

python setup.py

Or you can do it manually by executing the following commands:

pip install python-chess

pip install flask

pip install pyttsx3

pip install webbrowser

# Execution
Run the following code in your terminal:

python play.py

#Then open the game in your browser:
```http://127.0.0.1:5000/intro

Features

  1. Voice Assistant
  2. Follows all official chess rules
  3. Four UCI engines(DevZero, Stockfish, CDrill, Deuterium)
  4. Play on two devices via ngrok
  5. Alerts for Check / Checkmate / Stalemate
  6. Simple and clean UI

Playing over the internet

You can use the tool ngrok for playing it in two different places of the world. Just download it, cd into the following directory and type the following code:

ngrok http 5000

Now send the following link provided by ngrok to the user you wish to play with. It will basically redirect the user to your localhost:5000.

Some Bugs

  1. Some engines stop working if used rapidly
  2. No conditions are applied for playing over the internet, i.e. anyone can play anymove at anytime.

About

Chess World is a Flask-based chess game supporting single-player (AI) and online multiplayer. It features a custom engine, multiple UCI-compatible engines, a voice assistant, and in-game alerts for check, checkmate, and stalemate. Players can compete locally or online via ngrok, with a simple, responsive UI for a smooth experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors