feen 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +1 -1
- data/README.md +19 -12
- data/lib/feen.rb +1 -1
- data/lib/feen/dumper/in_hand.rb +1 -1
- data/lib/feen/parser.rb +1 -1
- metadata +35 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59e59d257cf32a7580d7a751f27046a94dc4cc042237d165a2a941d34928c0c5
|
4
|
+
data.tar.gz: d17e95bad6d8868e37f1a2dab71d198f44b9fd742400bb70d3f314b8e79c2155
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32ac92d63927327f269559bbafe824265504981178ace24f748ec3201f274669802ea3658c813df3747d5b66cbfb183de92fa9aa57444b807a6f3a5989d1fc7
|
7
|
+
data.tar.gz: 6352db3b19a703f15102ccba19bb8491605307575a901d862fa19df550558af37610d9ed720afe865975f4e7701b85efae55fcfbab9539786c03c1ec7d780921
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
1
|
# FEEN.rb
|
2
2
|
|
3
|
-
[![
|
4
|
-
[![
|
3
|
+
[![Version](https://img.shields.io/github/v/tag/sashite/feen.rb?label=Version&logo=github)](https://github.com/sashite/feen.rb/releases)
|
4
|
+
[![Yard documentation](https://img.shields.io/badge/Yard-documentation-blue.svg?logo=github)](https://rubydoc.info/github/sashite/feen.rb/main)
|
5
|
+
[![CI](https://github.com/sashite/feen.rb/workflows/CI/badge.svg?branch=main)](https://github.com/sashite/feen.rb/actions?query=workflow%3Aci+branch%3Amain)
|
6
|
+
[![RuboCop](https://github.com/sashite/feen.rb/workflows/RuboCop/badge.svg?branch=main)](https://github.com/sashite/feen.rb/actions?query=workflow%3Arubocop+branch%3Amain)
|
7
|
+
[![License](https://img.shields.io/github/license/sashite/feen.rb?label=License&logo=github)](https://github.com/sashite/feen.rb/raw/main/LICENSE.md)
|
5
8
|
|
6
9
|
> __FEEN__ (Forsyth–Edwards Expanded Notation) support for the Ruby language.
|
7
10
|
|
@@ -20,16 +23,20 @@ More exotic variants are also supported, like: [Dai dai shogi](https://en.wikipe
|
|
20
23
|
Add this line to your application's Gemfile:
|
21
24
|
|
22
25
|
```ruby
|
23
|
-
gem
|
26
|
+
gem "feen"
|
24
27
|
```
|
25
28
|
|
26
29
|
And then execute:
|
27
30
|
|
28
|
-
|
31
|
+
```sh
|
32
|
+
bundle
|
33
|
+
```
|
29
34
|
|
30
35
|
Or install it yourself as:
|
31
36
|
|
32
|
-
|
37
|
+
```sh
|
38
|
+
gem install feen
|
39
|
+
```
|
33
40
|
|
34
41
|
## Usage
|
35
42
|
|
@@ -38,13 +45,13 @@ require "feen"
|
|
38
45
|
|
39
46
|
# Dump a classic Tsume Shogi problem
|
40
47
|
FEEN.dump(
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
+
in_hand: %w[S 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],
|
49
|
+
shape: [9, 9],
|
50
|
+
side_id: 0,
|
51
|
+
square: {
|
52
|
+
3 => "s",
|
53
|
+
4 => "k",
|
54
|
+
5 => "s",
|
48
55
|
22 => "+P",
|
49
56
|
43 => "+B"
|
50
57
|
}
|
data/lib/feen.rb
CHANGED
@@ -8,7 +8,7 @@ require_relative File.join("feen", "parser")
|
|
8
8
|
#
|
9
9
|
# @see https://developer.sashite.com/specs/forsyth-edwards-expanded-notation
|
10
10
|
module FEEN
|
11
|
-
#
|
11
|
+
# Dumps position params into a FEEN string.
|
12
12
|
#
|
13
13
|
# @param in_hand [Array] The list of pieces in hand.
|
14
14
|
# @param shape [Array] The shape of the board.
|
data/lib/feen/dumper/in_hand.rb
CHANGED
data/lib/feen/parser.rb
CHANGED
@@ -28,7 +28,7 @@ module FEEN
|
|
28
28
|
#
|
29
29
|
# @return [Hash] The position params representing the position.
|
30
30
|
def self.call(feen)
|
31
|
-
square_str, side_id_str, in_hand_str = feen.split
|
31
|
+
square_str, side_id_str, in_hand_str = feen.split
|
32
32
|
|
33
33
|
{
|
34
34
|
in_hand: InHand.parse(in_hand_str),
|
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: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brutal
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-md
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rubocop-performance
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: rubocop-thread_safety
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,7 +175,7 @@ metadata:
|
|
147
175
|
bug_tracker_uri: https://github.com/sashite/feen.rb/issues
|
148
176
|
documentation_uri: https://rubydoc.info/gems/feen/index
|
149
177
|
source_code_uri: https://github.com/sashite/feen.rb
|
150
|
-
post_install_message:
|
178
|
+
post_install_message:
|
151
179
|
rdoc_options: []
|
152
180
|
require_paths:
|
153
181
|
- lib
|
@@ -155,15 +183,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
183
|
requirements:
|
156
184
|
- - ">="
|
157
185
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
186
|
+
version: 3.0.0
|
159
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
188
|
requirements:
|
161
189
|
- - ">="
|
162
190
|
- !ruby/object:Gem::Version
|
163
191
|
version: '0'
|
164
192
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
166
|
-
signing_key:
|
193
|
+
rubygems_version: 3.2.22
|
194
|
+
signing_key:
|
167
195
|
specification_version: 4
|
168
196
|
summary: FEEN support for the Ruby language.
|
169
197
|
test_files: []
|