SuperTues is a board game created by Peder Lindberg (rights reserved and used here with permission). This gem contains the "game logic" as a series of plain-old ruby objects.
Add this line to your application's Gemfile:
gem 'super_tues-board'
And then execute:
$ bundle
Or install it yourself as:
$ gem install super_tues-board
Create a new SuperTues game with the following:
game = Game.new
An "in-progress" game can be started by passing a GameState object during initialization:
game = Game.new(GameState.load(...))
Players can be added to the game using:
player = game.add_player('player_name', Candidate.new("Sen. Barnes"))
Advance the game when a player takes a turn:
player_updates = game.player_turn(player.actions)
- Fork it ( http://github.com//super_tues-board/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request