shogi-ruby 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1d9adb763c45ed657013e948eafbf95dcf725f5
4
- data.tar.gz: b9de61f51fe8558c46dddc5874b0be4b5056a9de
3
+ metadata.gz: e429472baaa224e6e0b2262cde50bfb08c23075b
4
+ data.tar.gz: 01a6477654158aca9f98345c1e8052c362fa1ffb
5
5
  SHA512:
6
- metadata.gz: cf5a19186b114727ba3b79da84cd09d416232dfb96b4291214b1261c7c3a644f6a0e51745245c19f1d14e0559f4f06044d64f937ed1c875a503ad00a6726cc19
7
- data.tar.gz: a6b4c96e15a308904430aecdbea5819fd5f1218209a8cf8950dcd95463af15435bea6781d28f5f97f4b76e757fc3d4b7fe761208f93cdb32d3aa7fc1b9f7877c
6
+ metadata.gz: 45d583c374b2b91803db38971127af6f5781ae4cc924e7a7f2fc35350bf17cd9c1e2e82a66f376b907aa6b6749c3eccdb772fe25420a38b5e4bbdd2d3c256114
7
+ data.tar.gz: db81567e8cde18b60a646b22e12504ee4918f9b247a5b1363764baefc2a0cb3d64b7d64472722da22a97e2dcf1be6b5d5ce0fa49acb4b3a3e41045bf63a740fc
data/.travis.yml CHANGED
@@ -2,3 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.0
6
+ matrix:
7
+ allow_failures:
8
+ - rvm: 2.1.0
data/NEWS.ja.md ADDED
@@ -0,0 +1,20 @@
1
+ # お知らせ
2
+
3
+ ## 0.0.7: 2013-10-29
4
+
5
+ ### 変更点
6
+
7
+ * 修正
8
+ * 七段目に入る駒と七段目から出る駒が成れなかった問題を修正
9
+ [Yoshiyuki Kawashimaさんがパッチ提供]
10
+
11
+ ### 感謝
12
+
13
+ * Yoshiyuki Kawashimaさん
14
+
15
+ ## 0.0.6: 2013-08-29
16
+
17
+ ### 変更点
18
+
19
+ * 改良
20
+ * Board#atメソッドを追加
data/NEWS.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # NEWS
2
2
 
3
+ ## 0.0.7: 2013-10-29
4
+
5
+ ### Changes
6
+
7
+ * Fixes
8
+ * Wrong index promote to 7 and from 7.
9
+ [Patch by Yoshiyuki Kawashima]
10
+
11
+ ### Thanks
12
+
13
+ * Yoshiyuki Kawashima
14
+
3
15
  ## 0.0.6: 2013-08-29
4
16
 
5
17
  ### Changes
data/lib/shogi/board.rb CHANGED
@@ -189,7 +189,7 @@ module Shogi
189
189
  raise_movement_error("Don't promote this move: #{csa}")
190
190
  end
191
191
  else
192
- unless after_y > 6 || before_y > 6
192
+ unless after_y > 5 || before_y > 5
193
193
  raise_movement_error("Don't promote this move: #{csa}")
194
194
  end
195
195
  end
data/lib/shogi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Shogi
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/test/test-board.rb CHANGED
@@ -319,4 +319,44 @@ P-00KA
319
319
  @board.move("+2755FU", :csa)
320
320
  end
321
321
  end
322
+
323
+ def test_move_csa_promote_to_7
324
+ position = <<-EOT
325
+ P1 * * * * * * * * *
326
+ P2 * * * * * * * * *
327
+ P3 * * * * * * * * *
328
+ P4 * * * * * * * * *
329
+ P5 * * * * * * * * *
330
+ P6 * * * * -FU * * * *
331
+ P7 * * * * * * * * *
332
+ P8 * * * * * * * * *
333
+ P9 * * * * * * * * *
334
+ P+
335
+ P-
336
+ EOT
337
+ @board = Shogi::Board.new(:csa, position)
338
+ assert_nothing_raised do
339
+ @board.move("-5657TO", :csa)
340
+ end
341
+ end
342
+
343
+ def test_move_csa_promote_from_7
344
+ position = <<-EOT
345
+ P1 * * * * * * * * *
346
+ P2 * * * * * * * * *
347
+ P3 * * * * * * * * *
348
+ P4 * * * * * * * * *
349
+ P5 * * * * * * * * *
350
+ P6 * * * * * * * * *
351
+ P7 * * * * -GI * * * *
352
+ P8 * * * * * * * * *
353
+ P9 * * * * * * * * *
354
+ P+
355
+ P-
356
+ EOT
357
+ @board = Shogi::Board.new(:csa, position)
358
+ assert_nothing_raised do
359
+ @board.move("-5746NG", :csa)
360
+ end
361
+ end
322
362
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shogi-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masafumi Yokoyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-29 00:00:00.000000000 Z
11
+ date: 2013-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -91,6 +91,7 @@ files:
91
91
  - .travis.yml
92
92
  - Gemfile
93
93
  - LICENSE.txt
94
+ - NEWS.ja.md
94
95
  - NEWS.md
95
96
  - README.md
96
97
  - Rakefile