go_gtp 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/go/gtp.rb +3 -2
  2. metadata +3 -3
@@ -2,7 +2,7 @@ require "go/gtp/board"
2
2
 
3
3
  module Go
4
4
  class GTP
5
- VERSION = "0.0.3"
5
+ VERSION = "0.0.4"
6
6
 
7
7
  def self.run_gnugo(options = { }, &commands)
8
8
  directory = options.fetch(:directory, nil)
@@ -97,8 +97,9 @@ module Go
97
97
  end
98
98
  alias_method :play?, :play
99
99
 
100
- def replay(vertices)
100
+ def replay(vertices, starting_color = "black")
101
101
  colors = %w[black white].cycle
102
+ colors.next unless starting_color == "black"
102
103
  vertices.each do |vertex|
103
104
  play(colors.next, vertex)
104
105
  return success? unless success?
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - James Edward Gray II
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-15 00:00:00 -05:00
18
+ date: 2010-10-16 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency