Giter Club home page Giter Club logo

stockfighter's Introduction

Stockfighter C++ Client

This is a framework for a Stockfighter client in C++.

Dependencies

These must be downloaded separately and placed in their own directories in the top-level folder:

json11 must also be downloaded and placed into ./sources, and ./headers as appropriate (only json11.hpp and json11.cpp are necessary.)

There are other dependencies (libcurl, OpenSSL, etc.) that are included by MacOS and need no further setup there.

Building

Right now the only environment set up to build is MacOS X. The ./generate.sh file should produce the Xcode project file, which is then used to build, run, debug, etc.

The project uses CMake so getting other environments set up should be doable. (There are some thing that will need a Windows analogue, like shell command support.)

Usage

The game is run by passing in the stockfighter settings file:

./stockfighter /path/to/settings.stockfighter

The level is instantiated from within game_t::impl_t::start:

    engine_m.start("first_steps");

Once the instance is running, the bulk of the client boils down to two handlers (both in ./sources/game.cpp):

  • game_t::impl_t::world_reaction. Code here responds to changes in the state of the world.
  • game_t::impl_t::ticker_reaction. Code here responds to changes in the ticker.

It helps to have one or more terminals tailing the logs and other output the client produces.

Future Work

  • Windows build support

  • TravisCI support

  • libcurl: move to the nonblocking (multi_) APIs. There's even an example that uses boost::asio for socket handling.

  • task_queue: Add per-thread queues and task stealing

  • Improve exception handling, both in the task queue and the recurrent engine.

stockfighter's People

Contributors

fosterbrereton avatar

Watchers

James Cloos avatar Jack Jubiao Yang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.