a c++ implementation of Baghchal. soon to be a full blown game engine with baghchal bots. :D
a basic web implementation of Baghchal so that users can play with baghchal engine bot. I have used the Baghchal.JS library to make this web game.
Click here to play Baghchal with our bot
you need to run the main.cpp somewhere and put the link to the server in the Set API field to be able to play with the bot
- Docker Desktop installed and running.
- Clone the repository:
git clone https://github.com/damakerdev/baghchal.git
cd baghchal- Build the Docker image:
docker build -t baghchal-engine .- Run the container:
docker run -it -p 8080:8080 baghchal-engineIf you prefer building directly on your host machine:
- G++ compiler supporting C++17 or higher
- Asio C++ Library (libasio-dev)
- Crow C++ Framework header files
-
Install these dependencies: g++,cmake, libasio-dev, git
-
Install crow header files:
git clone https://github.com/CrowCpp/Crow.git /tmp/crow
sudo cp -r /tmp/crow/include/* /usr/local/include/- Compile the source files:
g++ -O2 src/*.cpp -o baghchal_server -pthread -I/usr/local/include- Start the server:
./baghchal_serverServer will initialize on http://localhost:8080.
The API server will be live and ready at http://localhost:8080. Then, you can change the API url in the website through the input field below the NEW GAME button.
Happy coding!