bioshogi 0.0.5 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3908,9 +3908,9 @@ EOT
3908
3908
  body: <<~EOT,
3909
3909
  +---------------------------+
3910
3910
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3911
- | ・ ・ ・ ・?飛?飛?飛 ・|
3912
- | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3911
+ | ・ ・ ・ ・?飛?飛?飛?飛 ・|
3913
3912
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3913
+ | ・ ・ ・ ・ ・ ・?飛 ・ ・|
3914
3914
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3915
3915
  | ・ ・ ・ ・ 歩 ・ ・ ・ ・|
3916
3916
  | ・ ・ 歩 ・ ・ 歩 ・ ○ ・|
@@ -3945,7 +3945,7 @@ EOT
3945
3945
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3946
3946
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3947
3947
  | ・ ・ ・ ・ ・ ・ ・ ・ ・|
3948
- | ・ ・ 歩 ・!銀 ・ ・ ・|
3948
+ | ・ ・ 歩 ・!銀 ・ ・ ・|
3949
3949
  | ・ 角 ・ ★ ○ ・ ・ 飛 ・|
3950
3950
  | ・ ・ ○ ・ ・ ・ ・ ・ ・|
3951
3951
  +---------------------------+
@@ -11,6 +11,15 @@
11
11
 
12
12
  module Bioshogi
13
13
  class Piece
14
+ concern :CLI do
15
+ included do
16
+ desc "piece", "駒一覧"
17
+ def piece
18
+ tp Piece.collect(&:to_h)
19
+ end
20
+ end
21
+ end
22
+
14
23
  class << self
15
24
  # 持駒文字列から駒配列に変換
16
25
  # Piece.s_to_a("飛0 角 竜1 馬2 龍2 飛").collect(&:name) # => ["飛", "飛", "飛", "飛", "角", "角", "角"]
@@ -273,4 +282,3 @@ module Bioshogi
273
282
  end
274
283
  end
275
284
  end
276
-
data/lib/bioshogi/v.rb CHANGED
@@ -39,7 +39,7 @@ module Bioshogi
39
39
  end
40
40
 
41
41
  def hash
42
- to_a.hash
42
+ @x.hash ^ @y.hash
43
43
  end
44
44
 
45
45
  def eql?(other)
@@ -1,3 +1,3 @@
1
1
  module Bioshogi
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.8"
3
3
  end
data/lib/bioshogi.rb CHANGED
@@ -43,8 +43,6 @@ if true
43
43
  loader.ignore("#{__dir__}/bioshogi/errors.rb")
44
44
  loader.ignore("#{__dir__}/bioshogi/contrib/**/*.rb")
45
45
  loader.ignore("#{__dir__}/bioshogi/assets")
46
- loader.ignore("#{__dir__}/bioshogi/cli.rb")
47
- loader.ignore("#{__dir__}/bioshogi/cli")
48
46
  loader.ignore("#{__dir__}/bioshogi/explain/{備考,囲い,戦型,手筋}")
49
47
 
50
48
  # 変換ルール調整
@@ -57,6 +55,7 @@ if true
57
55
  loader.do_not_eager_load("#{__dir__}/bioshogi/explain/file_normalizer.rb")
58
56
  loader.do_not_eager_load("#{__dir__}/bioshogi/extreme_validator.rb")
59
57
  loader.do_not_eager_load("#{__dir__}/bioshogi/formatter/animation/demo_builder.rb")
58
+ loader.do_not_eager_load("#{__dir__}/bioshogi/cli.rb")
60
59
 
61
60
  # CLI用
62
61
  # loader.do_not_eager_load("#{__dir__}/bioshogi/commands/*.rb")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bioshogi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Ikeda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-13 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -625,8 +625,6 @@ files:
625
625
  - lib/bioshogi/board_parser/sfen_board_parser.rb
626
626
  - lib/bioshogi/builder.rb
627
627
  - lib/bioshogi/cli.rb
628
- - lib/bioshogi/cli/.gitignore
629
- - lib/bioshogi/cli/piece.rb
630
628
  - lib/bioshogi/container.rb
631
629
  - lib/bioshogi/container/basic.rb
632
630
  - lib/bioshogi/container/checkmate_yomiage.rb
@@ -1 +0,0 @@
1
- output
@@ -1,26 +0,0 @@
1
- require "../cli" if $0 == __FILE__
2
-
3
- module Bioshogi
4
- class CLI
5
- desc "piece", "駒一覧"
6
- def piece
7
- tp Piece.collect(&:to_h)
8
- end
9
- end
10
- end
11
-
12
- if $0 == __FILE__
13
- Bioshogi::CLI.start(["piece"])
14
- end
15
- # >> |--------+------+-------------+---------------+----------------------------+------------------------------+-----------+------------+--------------+----------+------|
16
- # >> | key | name | basic_alias | promoted_name | promoted_formal_sheet_name | other_matched_promoted_names | sfen_char | promotable | always_alive | stronger | code |
17
- # >> |--------+------+-------------+---------------+----------------------------+------------------------------+-----------+------------+--------------+----------+------|
18
- # >> | king | 玉 | 王 | | | | K | false | true | false | 0 |
19
- # >> | rook | 飛 | | 龍 | | 竜 | R | true | true | true | 1 |
20
- # >> | bishop | 角 | | 馬 | | | B | true | true | true | 2 |
21
- # >> | gold | 金 | | | | | G | false | true | false | 3 |
22
- # >> | silver | 銀 | | 全 | 成銀 | | S | true | true | false | 4 |
23
- # >> | knight | 桂 | | 圭 | 成桂 | 今 | N | true | false | false | 5 |
24
- # >> | lance | 香 | | 杏 | 成香 | 仝 | L | true | false | false | 6 |
25
- # >> | pawn | 歩 | | と | | | P | true | false | false | 7 |
26
- # >> |--------+------+-------------+---------------+----------------------------+------------------------------+-----------+------------+--------------+----------+------|