An open API service indexing awesome lists of open source software.

https://github.com/konaeakira/gomoku-server

HTTP Gomoku server
https://github.com/konaeakira/gomoku-server

Last synced: about 1 month ago
JSON representation

HTTP Gomoku server

Awesome Lists containing this project

README

        

# Gomoku Server

A Gomoku Server to host matches between Gomoku-playing computer programs.

## Features

- Nice and clean Web GUI with websocket communication.

## Compiling

**Dependencies:**

- Boost 1.65++
- [WebSocket++ 0.7.0](https://github.com/zaphoyd/websocketpp/releases/tag/0.7.0)

```
$ make
```

## Usage

### Starting the server

```
$ ./gomoku-server.out [port]
```

### Creating players compatible with the server

The program should read commands from the server from `stdin` and respond to `stdout`. All output to `stderr` and `stdlog` will be ignored.

Responses from the player will always begin with `OK`, unless there is an error, in which case the player should print `ERROR` followed by a space and the error message.

#### About

The program will print out its name.

- Input: `ABOUT`
- Output: `OK `

Example:

```
$ ABOUT
OK KonaeAkira's Gomoku Bot
```

#### New

The program should initialize itself and start with an empty board with the given properties.

- Input: `NEW `
- Output: `OK`

*Note:* The total time and time increment are given in seconds. If the time limit of any of them is exceeded, the player will be disqualified.

Example:

```
$ NEW 15 5 BLACK
OK
```

#### Turn

Server signals that it is the player's turn to move. The player should then respond with its move.

- Input: `TURN`
- Output: `OK `

*Note:* If an invalid move is given, the player will be automatically disqualified.

Example:

```
$ TURN
OK 0 7
```

#### Move

Server updates the player with the opponent's move.

- Input: `MOVE `
- Output: `OK`

Example:

```
$ MOVE 5 4
OK
```

#### Exit

Upon receiving this command, the player should clean up all its used resources and perform a clean exit.

- Input: `EXIT`
- Output: none

*Note:* The player should immediately exit without responding to the server.

Example:

```
$ EXIT
```