No commit activity in last 3 years
No release in over 3 years
Simple ruby codenjoy client.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Simple codenjoy ruby client.

Usage

  1. gem install codenjoy-ruby-client
  2. Create file client.rb:
    require 'codenjoy_ruby_client'

    ## CRClient is the alias for CodenjoyRubyClient
    CRClient.run do |query|
      p "We have #{query}"

      'left=0, right=0, rotate=0, drop' # Here is our response to the server
    end
  1. Run ruby client.rb in console

Description

You can use next constants to make your code more readable:

    # Cell status
    CRClient::EMPTY      # ' '
    CRClient::BUSY       # '*'

    # Rotate clockwise
    CRClient::ROTATE_0   # 0
    CRClient::ROTATE_90  # 1
    CRClient::ROTATE_180 # 2
    CRClient::ROTATE_270 # 3