qi 10.0.0.beta6 → 10.0.0.beta7
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/qi.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e850bab495ea23b4c438ec54439eb4b4b0486d0b6d1afd23f9d9d870eca46e43
|
4
|
+
data.tar.gz: 0f0e3271857d1a513069416bcb246b439f3fb99b3f550a9a9f1e1bc15b286a35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c94b483676c67796e208e2b354420c9fd20d0f286d2e3f4c6145a70945d61f601b8803af2ebed7bca964435881a27499a63f18151073f8bcf04126a65b265e2a
|
7
|
+
data.tar.gz: 62665dedc27de056316e923fcf5e6e604de42c399b00b2b015b5a2e44049fae9f05cee3a95d08aaaf655f77a54f1ae923ebcfe69ec373ba37657aa45bb656b52
|
data/README.md
CHANGED
data/lib/qi.rb
CHANGED
@@ -69,6 +69,22 @@ class Qi
|
|
69
69
|
]
|
70
70
|
end
|
71
71
|
|
72
|
+
# Returns a hash representation of the Qi object's attributes.
|
73
|
+
#
|
74
|
+
# @return [Hash{Symbol => Object}] a hash containing four key-value pairs:
|
75
|
+
# - is_north_turn: a boolean value indicating whose turn it is
|
76
|
+
# - north_captures: an array of pieces captured by the north player
|
77
|
+
# - south_captures: an array of pieces captured by the south player
|
78
|
+
# - squares: a hash of squares on the board
|
79
|
+
def to_h
|
80
|
+
{
|
81
|
+
is_north_turn: north_turn?,
|
82
|
+
north_captures:,
|
83
|
+
south_captures:,
|
84
|
+
squares:
|
85
|
+
}
|
86
|
+
end
|
87
|
+
|
72
88
|
# Returns a string representation of the Qi object's attributes.
|
73
89
|
#
|
74
90
|
# @return [String] a string containing three parts separated by "===":
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.0.
|
4
|
+
version: 10.0.0.beta7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An abstraction that could help to update positions for games like Shogi.
|
14
14
|
email: contact@cyril.email
|