go_gtp 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/go/gtp/point.rb CHANGED
@@ -50,7 +50,7 @@ module Go
50
50
  end
51
51
 
52
52
  def to_gnugo(board_size = 19)
53
- "#{(BIG_A + @x).chr}#{board_size - @y}"
53
+ "#{(BIG_A + @x + (@x >= 8 ? 1 : 0)).chr}#{board_size - @y}"
54
54
  end
55
55
  alias_method :to_s, :to_gnugo
56
56
  end
data/lib/go/gtp.rb CHANGED
@@ -2,7 +2,7 @@ require "go/gtp/board"
2
2
 
3
3
  module Go
4
4
  class GTP
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
6
6
 
7
7
  def self.run_gnugo(options = { }, &commands)
8
8
  directory = options.fetch(:directory, nil)
data/spec/point_spec.rb CHANGED
@@ -70,6 +70,9 @@ describe Go::GTP::Point do
70
70
  it "should skip over the unused I column" do
71
71
  Go::GTP::Point.new("H19").to_indices.should satisfy { |ln| ln == [7, 0] }
72
72
  Go::GTP::Point.new("J19").to_indices.should satisfy { |ln| ln == [8, 0] }
73
+
74
+ Go::GTP::Point.new("ha").to_gnugo.should satisfy { |ln| ln == "H19" }
75
+ Go::GTP::Point.new("ia").to_gnugo.should satisfy { |ln| ln == "J19" }
73
76
  end
74
77
  end
75
78
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - James Edward Gray II