twisty_puzzles 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twisty_puzzles/algorithm.rb +3 -1
- data/lib/twisty_puzzles/cancellation_helper.rb +2 -2
- data/lib/twisty_puzzles/color_scheme.rb +1 -1
- data/lib/twisty_puzzles/coordinate.rb +4 -0
- data/lib/twisty_puzzles/cube.rb +2 -4
- data/lib/twisty_puzzles/version.rb +1 -1
- 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: fa3e196d509ec1452a947269c43028b2ee5e3be803f4d3bf510ef5c170d01310
|
4
|
+
data.tar.gz: 704d10067e79b8d78e3eb5367795200695d4445a44873d198936136568ddc3e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 197fc8e07f87b42434f8b126fa9fdcec56a5a47f883d7faf892aecf9c440e01d97c991f15734bdfdda42ee95ca78660f2da7cde1d165c37f2613218532894361
|
7
|
+
data.tar.gz: 840a076a049ef64a39c82e4b8f6f9721d71be47bc8a232c278bd7f2cc67bd564e2f4dd566b59d1db14582ec6be2a6b4cc6c6001d2eafe51bcb7ce5335dda3bf9
|
@@ -43,7 +43,7 @@ module TwistyPuzzles
|
|
43
43
|
raise TypeError unless algorithm.is_a?(Algorithm)
|
44
44
|
|
45
45
|
CubeState.check_cube_size(cube_size)
|
46
|
-
alg = Algorithm
|
46
|
+
alg = Algorithm.empty
|
47
47
|
algorithm.moves.each do |m|
|
48
48
|
alg = push_with_cancellation(alg, m, cube_size)
|
49
49
|
end
|
@@ -107,7 +107,7 @@ module TwistyPuzzles
|
|
107
107
|
def self.rotation_sequences
|
108
108
|
@rotation_sequences ||=
|
109
109
|
begin
|
110
|
-
trivial_rotation_algs = [Algorithm
|
110
|
+
trivial_rotation_algs = [Algorithm.empty]
|
111
111
|
single_rotation_algs = Rotation::NON_ZERO_ROTATIONS.map { |e| Algorithm.move(e) }
|
112
112
|
combined_rotation_algs = self.combined_rotation_algs
|
113
113
|
rotation_algs = trivial_rotation_algs + single_rotation_algs + combined_rotation_algs
|
data/lib/twisty_puzzles/cube.rb
CHANGED
@@ -286,7 +286,7 @@ module TwistyPuzzles
|
|
286
286
|
# lie where the given other face currently is.
|
287
287
|
def rotation_to(other)
|
288
288
|
if other == self
|
289
|
-
Algorithm
|
289
|
+
Algorithm.empty
|
290
290
|
else
|
291
291
|
# There can be multiple solutions.
|
292
292
|
axis_face =
|
@@ -470,7 +470,6 @@ module TwistyPuzzles
|
|
470
470
|
# Represents one wing or the position of one wing on the cube.
|
471
471
|
class Wing < Part
|
472
472
|
extend EdgeLike
|
473
|
-
WING_BASE_INDEX_INVERTED_FACE_SYMBOLS = %i[U R B].freeze
|
474
473
|
FACES = 2
|
475
474
|
|
476
475
|
ELEMENTS = generate_parts
|
@@ -543,8 +542,7 @@ module TwistyPuzzles
|
|
543
542
|
|
544
543
|
# One index of such a piece on a on a NxN face.
|
545
544
|
def base_index_on_other_face(face, _cube_size, incarnation_index)
|
546
|
-
|
547
|
-
inverse = WING_BASE_INDEX_INVERTED_FACE_SYMBOLS.include?(face.face_symbol)
|
545
|
+
inverse = face.piece_index.even?
|
548
546
|
coordinates = [0, 1 + incarnation_index]
|
549
547
|
inverse ? coordinates.reverse : coordinates
|
550
548
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twisty_puzzles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernhard F. Brodowsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|