ruby-go 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/game.rb +1 -1
- data/test/go_test.rb +27 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f24b07ee968e8a121f825d7c64e615649b8379e
|
4
|
+
data.tar.gz: 647b951b33b4394a657ddb1a749b8677ad6497c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 365788568b669d24207f3e52c604cf218f5c4e6228ec1316b5847a8e9ceadfd25f2f03807cfba0fc5793c79e88fbceffc3559b471e69c9762c43a7382ca401bb
|
7
|
+
data.tar.gz: b0c4e34d1cf9482e68322dcc3e9f6bc7b47ae1a6952baa4c7ac47b047599082ccddd05e677f3ec4fd62aa12bf76a4f52e21a8dbbd3b390fd59f80fecc475bf43
|
data/lib/game.rb
CHANGED
data/test/go_test.rb
CHANGED
@@ -130,6 +130,32 @@ class GoTest < Minitest::Test
|
|
130
130
|
game.white(4,3)
|
131
131
|
end
|
132
132
|
end
|
133
|
-
end
|
134
133
|
|
134
|
+
def big_capture_area_game
|
135
|
+
game = Game.new
|
136
|
+
game.black(0,0)
|
137
|
+
game.white(1,1)
|
138
|
+
game.black(0,1)
|
139
|
+
game.white(0,2)
|
140
|
+
game.black(1,0)
|
141
|
+
game.white(2,0)
|
142
|
+
game
|
143
|
+
end
|
135
144
|
|
145
|
+
def test_can_play_in_previous_capture_area_that_is_not_a_ko
|
146
|
+
game = big_capture_area_game
|
147
|
+
assert_equal Liberty.new(0,0), game.board.at(0,0)
|
148
|
+
game.black(0,0)
|
149
|
+
assert_equal BlackStone.new(0,0), game.board.at(0,0)
|
150
|
+
|
151
|
+
game = big_capture_area_game
|
152
|
+
assert_equal Liberty.new(0,1), game.board.at(0,1)
|
153
|
+
game.black(0,1)
|
154
|
+
assert_equal BlackStone.new(0,1), game.board.at(0,1)
|
155
|
+
|
156
|
+
game = big_capture_area_game
|
157
|
+
assert_equal Liberty.new(1,0), game.board.at(1,0)
|
158
|
+
game.black(1,0)
|
159
|
+
assert_equal BlackStone.new(1,0), game.board.at(1,0)
|
160
|
+
end
|
161
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-go
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jphager2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: SgfParser
|
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.
|
65
|
+
rubygems_version: 2.4.6
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: The game of Go, writen in Ruby
|