feen 3.0.1 → 3.0.2

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/feen.rb +1 -1
  4. data/lib/feen/parser.rb +2 -11
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3585266b1c9c0258b6d840ee53f531762cca31a2bb4ca10036fdb6df3a478438
4
- data.tar.gz: acf62c61d0924632863e1b8058725a7217506dd9e5f674ec43f538d47cd47c7c
3
+ metadata.gz: 2a0c53a0d0d53b43e1cb9f06511fe1c7bc3eee6c6552c4902b140133c32cc754
4
+ data.tar.gz: 843631005e3047239e98d485907bf57870dc56e45f4aa2848bf37976dd53e00d
5
5
  SHA512:
6
- metadata.gz: 20b20c66e7b912bb6837938d7bc33068b4ca1c953d09bfb92a6722fdc6b42d161d6a4afe7e1cfa0f90158e85bfd55365ac678095b3c34b754fe025f5518ac63b
7
- data.tar.gz: dce69ca58ba69a3e8dab282bd16752b189e3707c8dc993bb2eba3e31c070afa4f9022a38df681340b24caa38142c370f2a15df58dff6331fc66d13c08b82e637
6
+ metadata.gz: efe66d045a3780bd4ec5e019f15e4e3302a42984a360c49e583d7e7f4ddf5fd9b13fefdc0807d8c2134fb87ac7c518fcae04bf91be8dc8dfdfef51c9dbb40f92
7
+ data.tar.gz: 7a003e96f398ac8c2d63f7164e182c3f6b36183f5dd1eb74e030bbeb77f54965b4922664d78766336b17a44cc0c3e87819c21976c32874724d57e8ea66da87ee
data/README.md CHANGED
@@ -68,7 +68,7 @@ FEEN.parse("3,s,k,s,3/9/4,+P,4/9/7,+B,1/9/9/9/9 0 S/b,g,g,g,g,n,n,n,n,p,p,p,p,p,
68
68
  # "indexes": [9, 9],
69
69
  # "pieces_in_hand_grouped_by_sides": [
70
70
  # %w[S],
71
- # %w[r r b g g g g s n n n n p p p p p p p p p p p p p p p p p]
71
+ # %w[b g g g g n n n n p p p p p p p p p p p p p p p p p r r s]
72
72
  # ]
73
73
  # }
74
74
  ```
@@ -62,7 +62,7 @@ module FEEN
62
62
  # # "indexes": [9, 9],
63
63
  # # "pieces_in_hand_grouped_by_sides": [
64
64
  # # %w[S],
65
- # # %w[r r b g g g g s n n n n p p p p p p p p p p p p p p p p p]
65
+ # # %w[b g g g g n n n n p p p p p p p p p p p p p p p p p r r s]
66
66
  # # ]
67
67
  # # }
68
68
  #
@@ -26,23 +26,14 @@ module FEEN
26
26
  # # "indexes": [9, 9],
27
27
  # # "pieces_in_hand_grouped_by_sides": [
28
28
  # # %w[S],
29
- # # %w[r r b g g g g s n n n n p p p p p p p p p p p p p p p p p]
29
+ # # %w[b g g g g n n n n p p p p p p p p p p p p p p p p p r r s]
30
30
  # # ]
31
31
  # # }
32
32
  #
33
33
  # @return [Hash] The position params representing the position.
34
34
  def self.call(feen)
35
- params(*feen.split(" "))
36
- end
35
+ board, active_side_id, in_hand = feen.split(" ")
37
36
 
38
- # Parse the FEEN string's three fields and return the position params.
39
- #
40
- # @param board [String] The flatten board.
41
- # @param active_side_id [String] The active side identifier.
42
- # @param in_hand [String] The captured actors.
43
- #
44
- # @return [Hash] The position params representing the position.
45
- private_class_method def self.params(board, active_side_id, in_hand)
46
37
  {
47
38
  active_side_id: Turn.parse(active_side_id),
48
39
  board: Board.new(board).to_h,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-08 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brutal