PyBot - majo-z/ChessProject GitHub Wiki

PyBot is a CLI tool that connects to the Chess Online API as any user.

This tool uses the argparse library.

the tool takes multiple optional and required arguments.

-n or --name : The user name of the user you want to connect as. (if the user doesn't exist, it will attempt to register the user.)

-p or --password : The password of the user you're connecting as.

-hn or --host : The hostname of the machine running the Chess Online server. (e.g. play-chess-online.com)

-pt or --port : The port the process is running on.

-g or --game_id : The game id of the game you want to connect to. This is provided by the server.

Some examples.

Create a new user and connect to game number 3422 to a game running on play-chess-online.com

python chessbot.py --name my_user_name --password my_desired_pass --game_id --host play-chess-online.com --port 80

Log in as an existing user and join a game 1223 when the process is running locally

python chessbot.py -n my_existing_user -p my_pass -g 1223

Note the default value for hostname is localhost and the default port is 8080 (the port that the Spring Boot server runs on)