Bridge
A lean mean bridge playing machine. Large portions of this gem have been ported from pybridge
Bridge is the bridge playing engine sitting behind the Leonardo Bridge API.
Installation
Add this line to your application's Gemfile:
#!ruby
gem 'bridge'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bridge
Usage
You can have a look at bin/play
for an example of interaction with the Bridge::Game class.
Here's a quick run-through:
#!ruby
require 'rubygems'
require 'bridge'
include Bridge
game = Game.new # start game
players = [] # keep players somewhere handy
Direction.each { |d| players[d] << game.add_player(d) }
# you're ready to start playing
Contributing
- Fork it
- 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