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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09cedd64dd22183ebc509b5c6671db22760801d56d9446faee819c601c6d35a0'
4
- data.tar.gz: b3f33ec180576fca527b880755aa44561170fcd5553b130a434dd352882bca6b
3
+ metadata.gz: 70e7339edc48b004892ec62f3e07972e12176d7c3a8e32316bb2f0cb810c776e
4
+ data.tar.gz: 97009141cae590b5a8440a76573dad87880ec009ef0d7c80efc6d9b8324de9fa
5
5
  SHA512:
6
- metadata.gz: 959b4cb436c7369bd26783507242c969f19a24630b5ddc577bd056bf73c9d9c6a5354cb4daa911753cfbc26567479ca842b603a55b3021911d4c80636ccd0b0e
7
- data.tar.gz: c2a9c1154346a9ddcb57be4888b8ddb749ac0afe062ea56c65932947c76d9e68fd9f71f569432d72a2219fa7bd4149668814318abf3ed9c6214b4b137b639cfb
6
+ metadata.gz: '0796d2ace84de665780541cfb90f96193eec124927b7328e89ee2f39930521017560c62a7b832d5f61c632fcc2cb3b1ba14fb23a8da1de72d7de398930f713a8'
7
+ data.tar.gz: ef8f6f1ce76294b1208563fda72d00ffcd6ab88f606d88f6b2f304917895aa5fc0a4c576ea09633c2b19e7263638f0929f91bb60d409715ace2501ed3296047a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bioshogi (0.0.4)
4
+ bioshogi (0.0.5)
5
5
  actionview
6
6
  activesupport (>= 7.1.0)
7
7
  color
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 input_checker # 入力
691
+ bioshogi input_match # 入力
692
692
  bioshogi piece # 駒一覧
693
693
  bioshogi versus # CPU同士の対戦
694
694
 
data/lib/bioshogi/cli.rb CHANGED
@@ -10,6 +10,7 @@ module Bioshogi
10
10
 
11
11
  include Converter::CLI
12
12
  include AI::Versus::CLI
13
+ include InputParser::CLI
13
14
  end
14
15
 
15
16
  Pathname(__dir__).glob("cli/*.rb").each { |e| require e }
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Bioshogi
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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
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
- # >> |--------+--------------+-----------+----------+-----------+------------+----------------+-------------+--------------+---------------------+------------------+----------------+----------+----------+--------+-----------+-----------------+-------------------+---------+-----------+----------------------|