-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from torjusti/feat/wide-moves
Feat/wide moves
- Loading branch information
Showing
6 changed files
with
173 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "cube-solver", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Solve Rubik's cube using the Kociemba algorithm.", | ||
"author": "Torjus Iveland <[email protected]>", | ||
"main": "dist/bundle.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`algorithms should strip rotations from algorithms correctly 1`] = ` | ||
Array [ | ||
3, | ||
9, | ||
8, | ||
11, | ||
8, | ||
3, | ||
9, | ||
5, | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as algorithms from '../algorithms'; | ||
|
||
describe('algorithms', () => { | ||
it('allow parsing invalid algorithms', () => { | ||
expect(() => { | ||
algorithms.parseAlgorithm("R U R' U' 1337 R' F R F'") | ||
}).toThrowError(); | ||
}); | ||
|
||
it('should correctly invert a given algorithm', () => { | ||
expect(algorithms.invertAlgorithm("r U R' U' r' F R F'")) | ||
.toEqual("F R' F' r U R U' r'"); | ||
}); | ||
|
||
it('should strip rotations from algorithms correctly', () => { | ||
expect(algorithms.parseAlgorithm("x R u R' u' y' z2 R' f R f'")) | ||
.toMatchSnapshot(); | ||
}); | ||
}); |