Skip to content
/ chex Public

A simple C++ chess engine that can run on browser or console

License

Notifications You must be signed in to change notification settings

Aadv1k/chex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chex

The homegrown cross-platform chess game/engine in C++

Quickstart

head on over to the releases and grab a copy for your system

Usage

$ chex help
Usage:
        ./bin/chex web --port 8000
        ./bin/chex console
Commands:
        web             Start Chex on a local web server
        console         Start Chex as a text-based game
        help            Print this help message
Options:
        --port, -p  Specify the port for the server (default: 8080)

Build

We use make to build the source

make chex
make clean

Test

make chex/tests
./bin/chex.test

Screenshots

Chex::WebUI

A chess game being played on the browser

Chex::ConsoleUI

Play a chess game on the console

-----------------------------------------------------
           Welcome to Chex::ConsoleUI!
-----------------------------------------------------
Type 'help' to see the list of available commands.

white's turn>

The Engine

The engine is aimed to be modular, hence here there is a clear separation between the UI and the engine itself. You can use the engine in your code if you wish to implement a different UI, for which you can refer to:

the-layers

  • UI: chex implements two UIs
    • ui/web: runs a web server and serves a html frontend
    • ui/console: this is essentially a TUI(ish) game
  • Game: The implementation for the game which is an abstraction over the board
  • Board: the board which is the base level of interaction