portable_move_notation 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/portable_move_notation/dumper.rb +4 -4
- data/lib/portable_move_notation/parser.rb +4 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f354941e49ee21295a339c9885f9329cd8e059655c25e6141548194ce23c4dc
|
4
|
+
data.tar.gz: 816893173aa18cfbb39d5615ea2c7867d02c700f36be13651537bc29b46c1b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d142873bf5b59d9cd7041c3ffd451ff209cece1644797315a5f8dc4971a6d0f8ce5334acfd7321f6387dbc5a6c34e8443ffece79038b0eb95891ac25f9c44200
|
7
|
+
data.tar.gz: 7dc417f6815e0c5484aae2a87213e18300f2eb41a3a21b919cc0e633868c3c5233752843671565e741ad8bdda8e9f05f18b831a162f7ae2d2bda25fef84fbc5f
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module PortableMoveNotation
|
4
4
|
class Dumper
|
5
|
-
def self.call(*
|
6
|
-
|
7
|
-
|
8
|
-
::Sashite::PAN::Dumper.call(*
|
5
|
+
def self.call(*moves)
|
6
|
+
moves.map do |move|
|
7
|
+
actions = move.each_slice(4)
|
8
|
+
::Sashite::PAN::Dumper.call(*actions)
|
9
9
|
end.join('.')
|
10
10
|
end
|
11
11
|
end
|
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
module PortableMoveNotation
|
4
4
|
class Parser
|
5
|
-
def self.call(
|
6
|
-
|
7
|
-
::Sashite::PAN::Parser.call(
|
5
|
+
def self.call(pmn_string)
|
6
|
+
pmn_string.split('.').map do |pan_string|
|
7
|
+
::Sashite::PAN::Parser.call(pan_string)
|
8
|
+
.flatten(1)
|
8
9
|
end
|
9
10
|
end
|
10
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: portable_move_notation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
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-06-
|
11
|
+
date: 2020-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sashite-pan
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: awesome_print
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|