vindinium-client ~master

A Vindinum client for D based AIs


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

vindinium-client

Simple Vindinium client library for D

See https://github.com/dymk/vindinium-starter-d for an example project using this

To create a game, use the Vindinium struct:

  • this(string key, string server, Mode mode, uint turns, string map)

where Mode is defined as:

enum Mode {
    Training,
    Arena
}

Call .connect() on the struct to create a VindiniumGame:

  import vindinium;
  auto vin = Vindinium(key, server, mode, turns, map);
  auto game = vin.connect();

Send commands to the client until the game is finished:

  while(!game.finished) {
    auto cmd = uniform!(VindiniumGame.Command);
    game.send_command(cmd);

    writefln("Turn %3d: Issued command: %s", game.turn, cmd);
  }

Access the current game state (data structures are in comm.d) through .state:

  auto board = game.state.game.board;
  auto hero  = game.state.hero;
  // etc
Authors:
  • Dylan Knutson
Dependencies:
std_data_json
Versions:
0.0.1 2014-Sep-11
~master 2014-Sep-11
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 206 downloads total

Score:
0.7
Short URL:
vindinium-client.dub.pm