grid_generator 0.2.18 → 0.2.19
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/Gemfile.lock +1 -1
- data/lib/grid_generator/megaminx/face_projection.rb +15 -1
- data/lib/grid_generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 397f62bc6d53733fc415d1021a5e432dce7786250bd54edafb9dcc5ff179c64d
|
4
|
+
data.tar.gz: 86cebdfc4ee6ba0e132a91e731b144c4887540e724110b2e9f8b9d65d5c9f73b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f5b89a4273b24b46ee85002671f0ead32ec9ab53ad716054ccc94f638e3090ffc4879d44146c141cbb3b9d7700907d642aa34c0b09277689fea3bd430c97e6
|
7
|
+
data.tar.gz: 0efe4b40a581cf9f98c4a88062716f68acbfdcc75a4bb89b11ab50e24ce0e4084cf3c62d2055fba4941135bd495ccee48f628e32a3f5010c51b213731e426571
|
data/Gemfile.lock
CHANGED
@@ -9,10 +9,11 @@ module GridGenerator
|
|
9
9
|
class FaceProjection
|
10
10
|
# units 30 - pentagon 90 - megaminx - 150
|
11
11
|
# units * 5
|
12
|
-
def initialize(x:, y:, units:, front_face_elements: "")
|
12
|
+
def initialize(x:, y:, units:, front_face_elements: "", top_right_face_elements: "")
|
13
13
|
@x, @y = x, y
|
14
14
|
@units = units
|
15
15
|
@front_face_elements = front_face_elements.split(',')
|
16
|
+
@top_right_face_elements = top_right_face_elements.split(',')
|
16
17
|
end
|
17
18
|
|
18
19
|
attr_reader :x, :y, :units, :front_face_elements
|
@@ -170,6 +171,19 @@ module GridGenerator
|
|
170
171
|
).build unless element == '-'
|
171
172
|
end.compact
|
172
173
|
end
|
174
|
+
|
175
|
+
def top_right_face_element_shapes
|
176
|
+
front_face_elements.each_with_index.map do |element, i|
|
177
|
+
GridGenerator::Megaminx::FaceElementFactory.new(
|
178
|
+
x: x,
|
179
|
+
y: y,
|
180
|
+
index: i,
|
181
|
+
face_points: top_right_pentagon_points,
|
182
|
+
face_lines: top_right_face_lines_raw,
|
183
|
+
face: element
|
184
|
+
).build unless element == '-'
|
185
|
+
end.compact
|
186
|
+
end
|
173
187
|
end
|
174
188
|
end
|
175
189
|
end
|