No commit activity in last 3 years
No release in over 3 years
Gem handling ws connection and simple communication for numerous games in Codenjoy.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

CodenjoyConnection

Gem handling ws connection and simple communication for numerous games in Codenjoy.

Installation

Add this line to your application's Gemfile:

gem 'codenjoy_connection'

And then execute:

$ bundle

Or install it yourself as:

$ gem install codenjoy_connection

Usage

    require 'codenjoy_connection'
    class Player
        def initialize
            # initialization of your user
        end

        def process_data(data)
            # logic for processing data  
        end
        def make_step
            # logic for making step
        end
    end

    player = Player.new
    opts = {:username => 'anatoli', :host=> 'localhost', :port => '8080', :game_url => 'codenjoy-contest/ws?'}
    CodenjoyConnection.play(player,opts)

Contributing

  1. Fork it ( https://github.com/anatoliliotych/codenjoy_connection/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request