CLI

Prerequisites

  • Docker

Installation

Download link

Linux and Darwin

chmod +x path/to/binary

Usage

Note

The first time you execute the CLI, docker images of size above 1GB are downloaded.

bash path/to/binary PLAYER_1_CODE.cpp PLAYER_2_CODE.cpp

This will compile, execute the player code and serve it in the port given by user (Default: 3000)

You can pass a custom map as well,

bash path/to/binary -m map.txt PLAYER_1_CODE.cpp PLAYER_2_CODE.cpp

The map file is 30 X 30 with one of three characters, L (land), W (water) or F (flag). An example with a 5 X 5 Map would be,

L L L L L

L W F W L

L W F W L

L W F W L

L L L L L

Note: End the file with a newline

To render a game which has been executed already,

path/to/binary -r [ -p PORT ] LOG_DIRECTORY

This will render the game log files in LOG_DIRECTORY Given directory must contain the following files : game.log, player_1.dlog, player_2.dlog

Checking logs

When the renderer is running in browser, player logs can be viewed in browser console.