bioshogi 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.org +1 -1
- data/lib/bioshogi/cli.rb +1 -0
- data/lib/bioshogi/explain/shape_info.rb +3 -3
- data/lib/bioshogi/input_parser.rb +9 -0
- data/lib/bioshogi/version.rb +1 -1
- metadata +1 -2
- data/lib/bioshogi/cli/input_checker.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70e7339edc48b004892ec62f3e07972e12176d7c3a8e32316bb2f0cb810c776e
|
4
|
+
data.tar.gz: 97009141cae590b5a8440a76573dad87880ec009ef0d7c80efc6d9b8324de9fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0796d2ace84de665780541cfb90f96193eec124927b7328e89ee2f39930521017560c62a7b832d5f61c632fcc2cb3b1ba14fb23a8da1de72d7de398930f713a8'
|
7
|
+
data.tar.gz: ef8f6f1ce76294b1208563fda72d00ffcd6ab88f606d88f6b2f304917895aa5fc0a4c576ea09633c2b19e7263638f0929f91bb60d409715ace2501ed3296047a
|
data/Gemfile.lock
CHANGED
data/README.org
CHANGED
@@ -688,7 +688,7 @@ Web Page:(Web Page)
|
|
688
688
|
Commands:
|
689
689
|
bioshogi convert # 棋譜フォーマット変換
|
690
690
|
bioshogi help [COMMAND] # Describe available commands or one specific command
|
691
|
-
bioshogi
|
691
|
+
bioshogi input_match # 入力
|
692
692
|
bioshogi piece # 駒一覧
|
693
693
|
bioshogi versus # CPU同士の対戦
|
694
694
|
|
data/lib/bioshogi/cli.rb
CHANGED
@@ -3280,10 +3280,10 @@ EOT
|
|
3280
3280
|
| ・ ・ ・ ・ ・ ・ ・ ・ ・|
|
3281
3281
|
| ・ ・ ・ ・ ・ ・ ・ ・ ・|
|
3282
3282
|
| ・ ・ ・ ・ ・ ・ ・ ・ ・|
|
3283
|
-
|
|
3283
|
+
| ・ ・ 歩 ● 歩 ・ ・ ・ ・|
|
3284
3284
|
| ・ ・ 桂 銀 銀 歩 歩 歩 歩|
|
3285
|
-
| ・ ・
|
3286
|
-
| ・ 飛
|
3285
|
+
| ・ ・ ・!金 ・!金!金 ・ ・|
|
3286
|
+
| ・ 飛 ○ ○ ○ ○ ○ ・ ・|
|
3287
3287
|
+---------------------------+
|
3288
3288
|
EOT
|
3289
3289
|
},
|
@@ -4,6 +4,15 @@ module Bioshogi
|
|
4
4
|
module InputParser
|
5
5
|
extend self
|
6
6
|
|
7
|
+
concern :CLI do
|
8
|
+
included do
|
9
|
+
desc "input_match", "指し手の一つ分の入力の読み取り"
|
10
|
+
def input_match(*argv)
|
11
|
+
InputParser.check(argv.join(" "))
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
7
16
|
def check(text)
|
8
17
|
rows = InputParser.scan(text).collect do |str|
|
9
18
|
{"入力" => str}.merge(match!(str).named_captures)
|
data/lib/bioshogi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bioshogi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Ikeda
|
@@ -626,7 +626,6 @@ files:
|
|
626
626
|
- lib/bioshogi/builder.rb
|
627
627
|
- lib/bioshogi/cli.rb
|
628
628
|
- lib/bioshogi/cli/.gitignore
|
629
|
-
- lib/bioshogi/cli/input_checker.rb
|
630
629
|
- lib/bioshogi/cli/piece.rb
|
631
630
|
- lib/bioshogi/container.rb
|
632
631
|
- lib/bioshogi/container/basic.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require "../cli" if $0 == __FILE__
|
2
|
-
|
3
|
-
module Bioshogi
|
4
|
-
class CLI
|
5
|
-
desc "input_checker", "入力"
|
6
|
-
def input_checker(*argv)
|
7
|
-
InputParser.check(argv.join(" "))
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
if $0 == __FILE__
|
13
|
-
Bioshogi::CLI.start(["input_checker", "68S", "△76歩 34歩"])
|
14
|
-
end
|
15
|
-
# >> |--------+--------------+-----------+----------+-----------+------------+----------------+-------------+--------------+---------------------+------------------+----------------+----------+----------+--------+-----------+-----------------+-------------------+---------+-----------+----------------------|
|
16
|
-
# >> | 入力 | ki2_location | kif_place | ki2_same | kif_piece | ki2_one_up | ki2_left_right | ki2_up_down | ki2_as_it_is | ki2_promote_trigger | kif_drop_trigger | kif_place_from | csa_sign | csa_from | csa_to | csa_piece | sfen_drop_piece | sfen_drop_trigger | sfen_to | sfen_from | sfen_promote_trigger |
|
17
|
-
# >> |--------+--------------+-----------+----------+-----------+------------+----------------+-------------+--------------+---------------------+------------------+----------------+----------+----------+--------+-----------+-----------------+-------------------+---------+-----------+----------------------|
|
18
|
-
# >> | 68S | | 68 | | S | | | | | | | | | | | | | | | | |
|
19
|
-
# >> | △76歩 | △ | 76 | | 歩 | | | | | | | | | | | | | | | | |
|
20
|
-
# >> | 34歩 | | 34 | | 歩 | | | | | | | | | | | | | | | | |
|
21
|
-
# >> |--------+--------------+-----------+----------+-----------+------------+----------------+-------------+--------------+---------------------+------------------+----------------+----------+----------+--------+-----------+-----------------+-------------------+---------+-----------+----------------------|
|