Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.23 KB

README.rdoc

File metadata and controls

48 lines (32 loc) · 1.23 KB

scuby-wars

Scuby-Wars is a little game where you have to implement your own AI-bots who will fight on a server against each other.

How to write your own Bot

You have to implement a class which inherits from ScubyWars::Client

class AndisBot < ScubyWars::Client
end

now you have to implement on method called think

class AndisBot < ScubyWars::Client

  def think
    # do your intelligent stuff here
  end

end

in your instance you can access the attribute world which has all informations about the world. And there are several methods you can call to control your bot:

run
stop
fire
cease_fire
turn_left
turn_right
stop_turning

Connect your bot

YourBot.new("server.address:port", "YourName").join()

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2011 Andi Bade. See LICENSE for details.