GithubHelp home page GithubHelp logo

simsa-st / contest24 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 28.85 MB

Library for 24-hour format contests such as Marathon24 or Challenge24.

License: Other

Python 11.24% CMake 29.34% C++ 50.81% C 0.45% Shell 7.33% Makefile 0.83%

contest24's Introduction

Contest24

This library provides useful tools for 24-hour programming competitions like Marathon24, Deadline24 and others.

Installing dependencies

This library has four dependencies:

You need to install just the first one, other three are in the project and are compiled together with this library (and Easylogging++ is header only).

To install SFML, you can use your system package manager. For example on ubuntu, you can run:

$ sudo apt-get install libsfml-dev

You can install SFGUI and Gflags as well, if you don't want to compile them with every new project. Just follow the instructions of the individual libraries.

Compiling

Make sure everything is installed properly by compiling the library together with the provided examples. To compile this library you will need cmake (or you can write your own Makefile or edit the one that is in templates/light/).

Go to the project root directory and run:

$ mkdir build && cd build
$ cmake ..
$ make

In the build/bin/ directory you will find compiled examples. Try to run examples_tcp_server and then (while the first binary is still running) examples_tcp_client -- these programs should send each other a message over TCP. You can also try the Candy Eaters example with the visualizer by running:

$ ./candy_eaters_server --ports=5500,5600 --vis
$ ./candy_eaters --port=5500 --vis --toolbar

Notice: In-source build is disabled (i.e. running cmake . in the root directory), so you really need to create the build directory and run cmake .. from there.

Using this library

When you are participating in 24-hour format contests you can write the code for it on three different occasions.

  • First there is code you can share between all these contests -- in this project this code lives under c24/ subdirectory.
  • Then there is code that you prepare before the contest itself, which is specific to this contest (implements the exact communication protocol, etc.). Examples of these can be found under templates/ subdirectory.
  • Finally there is code that you write on the contest itself. Such an example can be found under examples/candy_eaters/.

Here is a tutorial to get you started:

contest24's People

Contributors

simsa-st avatar

Watchers

 avatar

contest24's Issues

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.