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

  1. Fork it
  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 new Pull Request