Skip to content

A lightweight C++ chess engine with a React frontend, supporting real-time gameplay and AI opponents.

Notifications You must be signed in to change notification settings

Omikrone/Chessgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

145 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Game - C++ Chessgame server & Web Interface

Chessgame Logo

Introduction

This project is a straightforward chess game built with C++. It features a C++ backend server and a web-based frontend developed using Vite. Chessgame is compatible with the Euphron chess engine and uses the Chessboard library for chess rules and logic.

  • Current version: 1.4.2

Features

This chess game includes the following features:

  • Session management for handling multiple games.
  • Compatible with standard chess rules.
  • Communication between server and web interface using WebSockets.
  • Simple and intuitive web interface for playing chess.
  • Compatibility with UCI protocol (via an http wrapper) for chess engines.
  • Play chess against Euphron, a chess engine developed in C++ !

Installation

This project is compatible with Windows and Linux, and requires CMake for building.

Prerequisites

Make sure you have the following dependencies installed:

Moreover, this project uses Crow for handling HTTP requests and WebSockets. You can either let CMake install it for you or install Crow manually by following the instructions on its GitHub repository.

Or, you can use Docker to run the project without installing dependencies manually.

Build with Docker

To build and run the project using Docker, follow these steps:

  1. Build the images with Docker Compose:
    docker-compose build
  1. You can then start the backend server and frontend with:
    docker-compose up

Build the Project (from source)

If you prefer to build the project from source, follow these steps:

  1. Clone the repository:
    git clone https://github.com/Omikrone/Chessgame.git
    cd Chessgame
  1. Build the C++ server using CMake:
    cmake -S . -B build
    cmake --build build --config Release
  1. Install the frontend dependencies:
    cd ../frontend
    npm install

Start the game

After building the project manually, you can start the chess game as follows:

  1. Start the C++ server:
    ./build/chessgame.exe
  1. Start the frontend:
    cd ../frontend
    npm run dev
  1. Don't forget to install and run Euphron chess engine if you want to play against it.

  2. Open your web browser and navigate to http://localhost:5173 to access the chess game interface.

Roadmap

Future improvements for this project may include:

  • Implementing a multiplayer mode over the network.
  • Add a clock/timer feature for timed games.
  • Add compatibility with more chess engines.

About

A lightweight C++ chess engine with a React frontend, supporting real-time gameplay and AI opponents.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published