- Client: SFML
- Server: any webserver supporting PHP, MySQL
To build client, run cmake -B build -S .
from the client
directory, followed by cmake --build build
.
For client, config file is game.cfg
and consists of these lines, in this order:
data path
- the path to the resources directory, default:./data
server host
- base URL to the server, default: 'localhost'find side url
- relative URL on the server to look up for the opponent, when game was started inrandom
mode; default isindex.php?find_side
find opponent url
- relative URL on the server to look up for the opponent, when game was started in a determined (white
orblack
) mode; default -index.php?find_opponent
server move validation url
- relative URL on the server to validate the player's move; default -index.php?validate_move
server querying url
- relative URL on the server to check for the moves pending; default value isindex.php?update_client
game start test url
- relative URL on the server to check whether game was started; default -index.php?is_game_started
For server, all the configuration is put inside the main file itself and consists only of database configuration. The options are:
DB_NAME
DB_HOST
DB_USER
DB_PASSWORD
Be sure to review them before running the server.
Then you will need to create database structure - you can easily achieve this by importing db_setup.sql
file from the server directory to the database described by those constants above.
To run client, run it with the side you want to play as (white
, black
or random
): buck run //client random
.
To run server, use the server.php
file.