-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e1315f
commit 8767214
Showing
5 changed files
with
497 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,193 @@ | ||
from solve.combo import Combination, Node | ||
from solve.shapes import circle, square, triangle | ||
|
||
_all_combinations_n = 3 * 1 * 3 * 2 * 1 * 2 * 1 * 1 * 1 | ||
_all_combinations = [ | ||
Combination( | ||
left=Node.from_inner_and_other(circle, circle), | ||
middle=Node.from_inner_and_other(triangle, triangle), | ||
right=Node.from_inner_and_other(square, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, circle), | ||
middle=Node.from_inner_and_other(triangle, square), | ||
right=Node.from_inner_and_other(square, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, triangle), | ||
middle=Node.from_inner_and_other(triangle, circle), | ||
right=Node.from_inner_and_other(square, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, triangle), | ||
middle=Node.from_inner_and_other(triangle, square), | ||
right=Node.from_inner_and_other(square, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, square), | ||
middle=Node.from_inner_and_other(triangle, circle), | ||
right=Node.from_inner_and_other(square, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, square), | ||
middle=Node.from_inner_and_other(triangle, triangle), | ||
right=Node.from_inner_and_other(square, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, circle), | ||
middle=Node.from_inner_and_other(square, triangle), | ||
right=Node.from_inner_and_other(triangle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, circle), | ||
middle=Node.from_inner_and_other(square, square), | ||
right=Node.from_inner_and_other(triangle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, triangle), | ||
middle=Node.from_inner_and_other(square, circle), | ||
right=Node.from_inner_and_other(triangle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, triangle), | ||
middle=Node.from_inner_and_other(square, square), | ||
right=Node.from_inner_and_other(triangle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, square), | ||
middle=Node.from_inner_and_other(square, circle), | ||
right=Node.from_inner_and_other(triangle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(circle, square), | ||
middle=Node.from_inner_and_other(square, triangle), | ||
right=Node.from_inner_and_other(triangle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, circle), | ||
middle=Node.from_inner_and_other(circle, triangle), | ||
right=Node.from_inner_and_other(square, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, circle), | ||
middle=Node.from_inner_and_other(circle, square), | ||
right=Node.from_inner_and_other(square, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, triangle), | ||
middle=Node.from_inner_and_other(circle, circle), | ||
right=Node.from_inner_and_other(square, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, triangle), | ||
middle=Node.from_inner_and_other(circle, square), | ||
right=Node.from_inner_and_other(square, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, square), | ||
middle=Node.from_inner_and_other(circle, circle), | ||
right=Node.from_inner_and_other(square, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, square), | ||
middle=Node.from_inner_and_other(circle, triangle), | ||
right=Node.from_inner_and_other(square, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, circle), | ||
middle=Node.from_inner_and_other(square, triangle), | ||
right=Node.from_inner_and_other(circle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, circle), | ||
middle=Node.from_inner_and_other(square, square), | ||
right=Node.from_inner_and_other(circle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, triangle), | ||
middle=Node.from_inner_and_other(square, circle), | ||
right=Node.from_inner_and_other(circle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, triangle), | ||
middle=Node.from_inner_and_other(square, square), | ||
right=Node.from_inner_and_other(circle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, square), | ||
middle=Node.from_inner_and_other(square, circle), | ||
right=Node.from_inner_and_other(circle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(triangle, square), | ||
middle=Node.from_inner_and_other(square, triangle), | ||
right=Node.from_inner_and_other(circle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, circle), | ||
middle=Node.from_inner_and_other(circle, triangle), | ||
right=Node.from_inner_and_other(triangle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, circle), | ||
middle=Node.from_inner_and_other(circle, square), | ||
right=Node.from_inner_and_other(triangle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, triangle), | ||
middle=Node.from_inner_and_other(circle, circle), | ||
right=Node.from_inner_and_other(triangle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, triangle), | ||
middle=Node.from_inner_and_other(circle, square), | ||
right=Node.from_inner_and_other(triangle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, square), | ||
middle=Node.from_inner_and_other(circle, circle), | ||
right=Node.from_inner_and_other(triangle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, square), | ||
middle=Node.from_inner_and_other(circle, triangle), | ||
right=Node.from_inner_and_other(triangle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, circle), | ||
middle=Node.from_inner_and_other(triangle, triangle), | ||
right=Node.from_inner_and_other(circle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, circle), | ||
middle=Node.from_inner_and_other(triangle, square), | ||
right=Node.from_inner_and_other(circle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, triangle), | ||
middle=Node.from_inner_and_other(triangle, circle), | ||
right=Node.from_inner_and_other(circle, square), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, triangle), | ||
middle=Node.from_inner_and_other(triangle, square), | ||
right=Node.from_inner_and_other(circle, circle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, square), | ||
middle=Node.from_inner_and_other(triangle, circle), | ||
right=Node.from_inner_and_other(circle, triangle), | ||
), | ||
Combination( | ||
left=Node.from_inner_and_other(square, square), | ||
middle=Node.from_inner_and_other(triangle, triangle), | ||
right=Node.from_inner_and_other(circle, circle), | ||
), | ||
] | ||
|
||
assert len(_all_combinations) == _all_combinations_n, \ | ||
f'number of all combination must be {_all_combinations_n}' | ||
all_combinations = {c.code: c for c in _all_combinations} | ||
del _all_combinations, _all_combinations_n | ||
|
||
__all__ = 'all_combinations', |
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,125 @@ | ||
number_of_moves_mixed = { | ||
'0[00]-3[33]-4[44]': 6, | ||
'0[00]-3[34]-4[43]': 4, | ||
'0[03]-3[30]-4[44]': 4, | ||
'0[03]-3[34]-4[40]': 4, | ||
'0[04]-3[30]-4[43]': 4, | ||
'0[04]-3[33]-4[40]': 4, | ||
'0[00]-4[43]-3[34]': 4, | ||
'0[00]-4[44]-3[33]': 6, | ||
'0[03]-4[40]-3[34]': 4, | ||
'0[03]-4[44]-3[30]': 4, | ||
'0[04]-4[40]-3[33]': 4, | ||
'0[04]-4[43]-3[30]': 4, | ||
'3[30]-0[03]-4[44]': 4, | ||
'3[30]-0[04]-4[43]': 4, | ||
'3[33]-0[00]-4[44]': 6, | ||
'3[33]-0[04]-4[40]': 4, | ||
'3[34]-0[00]-4[43]': 4, | ||
'3[34]-0[03]-4[40]': 4, | ||
'3[30]-4[43]-0[04]': 4, | ||
'3[30]-4[44]-0[03]': 4, | ||
'3[33]-4[40]-0[04]': 4, | ||
'3[33]-4[44]-0[00]': 6, | ||
'3[34]-4[40]-0[03]': 4, | ||
'3[34]-4[43]-0[00]': 4, | ||
'4[40]-0[03]-3[34]': 4, | ||
'4[40]-0[04]-3[33]': 4, | ||
'4[43]-0[00]-3[34]': 4, | ||
'4[43]-0[04]-3[30]': 4, | ||
'4[44]-0[00]-3[33]': 6, | ||
'4[44]-0[03]-3[30]': 4, | ||
'4[40]-3[33]-0[04]': 4, | ||
'4[40]-3[34]-0[03]': 4, | ||
'4[43]-3[30]-0[04]': 4, | ||
'4[43]-3[34]-0[00]': 4, | ||
'4[44]-3[30]-0[03]': 4, | ||
'4[44]-3[33]-0[00]': 6, | ||
} | ||
""" | ||
Combination code to the number of moves required to solve statues using ``KSMixed``. | ||
""" | ||
|
||
number_of_moves_double1 = { | ||
'0[00]-3[33]-4[44]': 8, | ||
'0[00]-3[34]-4[43]': 6, | ||
'0[03]-3[30]-4[44]': 6, | ||
'0[03]-3[34]-4[40]': 6, | ||
'0[04]-3[30]-4[43]': 4, | ||
'0[04]-3[33]-4[40]': 6, | ||
'0[00]-4[43]-3[34]': 6, | ||
'0[00]-4[44]-3[33]': 8, | ||
'0[03]-4[40]-3[34]': 6, | ||
'0[03]-4[44]-3[30]': 6, | ||
'0[04]-4[40]-3[33]': 6, | ||
'0[04]-4[43]-3[30]': 4, | ||
'3[30]-0[03]-4[44]': 6, | ||
'3[30]-0[04]-4[43]': 4, | ||
'3[33]-0[00]-4[44]': 8, | ||
'3[33]-0[04]-4[40]': 6, | ||
'3[34]-0[00]-4[43]': 6, | ||
'3[34]-0[03]-4[40]': 6, | ||
'3[30]-4[43]-0[04]': 4, | ||
'3[30]-4[44]-0[03]': 6, | ||
'3[33]-4[40]-0[04]': 6, | ||
'3[33]-4[44]-0[00]': 8, | ||
'3[34]-4[40]-0[03]': 6, | ||
'3[34]-4[43]-0[00]': 6, | ||
'4[40]-0[03]-3[34]': 6, | ||
'4[40]-0[04]-3[33]': 6, | ||
'4[43]-0[00]-3[34]': 6, | ||
'4[43]-0[04]-3[30]': 4, | ||
'4[44]-0[00]-3[33]': 8, | ||
'4[44]-0[03]-3[30]': 6, | ||
'4[40]-3[33]-0[04]': 6, | ||
'4[40]-3[34]-0[03]': 6, | ||
'4[43]-3[30]-0[04]': 4, | ||
'4[43]-3[34]-0[00]': 6, | ||
'4[44]-3[30]-0[03]': 6, | ||
'4[44]-3[33]-0[00]': 8, | ||
} | ||
""" | ||
Combination code to the number of moves required to solve statues using ``KSDouble1``. | ||
""" | ||
|
||
number_of_moves_double2 = { | ||
'0[00]-3[33]-4[44]': 8, | ||
'0[00]-3[34]-4[43]': 6, | ||
'0[03]-3[30]-4[44]': 6, | ||
'0[03]-3[34]-4[40]': 4, | ||
'0[04]-3[30]-4[43]': 6, | ||
'0[04]-3[33]-4[40]': 6, | ||
'0[00]-4[43]-3[34]': 6, | ||
'0[00]-4[44]-3[33]': 8, | ||
'0[03]-4[40]-3[34]': 4, | ||
'0[03]-4[44]-3[30]': 6, | ||
'0[04]-4[40]-3[33]': 6, | ||
'0[04]-4[43]-3[30]': 6, | ||
'3[30]-0[03]-4[44]': 6, | ||
'3[30]-0[04]-4[43]': 6, | ||
'3[33]-0[00]-4[44]': 8, | ||
'3[33]-0[04]-4[40]': 6, | ||
'3[34]-0[00]-4[43]': 6, | ||
'3[34]-0[03]-4[40]': 4, | ||
'3[30]-4[43]-0[04]': 6, | ||
'3[30]-4[44]-0[03]': 6, | ||
'3[33]-4[40]-0[04]': 6, | ||
'3[33]-4[44]-0[00]': 8, | ||
'3[34]-4[40]-0[03]': 4, | ||
'3[34]-4[43]-0[00]': 6, | ||
'4[40]-0[03]-3[34]': 4, | ||
'4[40]-0[04]-3[33]': 6, | ||
'4[43]-0[00]-3[34]': 6, | ||
'4[43]-0[04]-3[30]': 6, | ||
'4[44]-0[00]-3[33]': 8, | ||
'4[44]-0[03]-3[30]': 6, | ||
'4[40]-3[33]-0[04]': 6, | ||
'4[40]-3[34]-0[03]': 4, | ||
'4[43]-3[30]-0[04]': 6, | ||
'4[43]-3[34]-0[00]': 6, | ||
'4[44]-3[30]-0[03]': 6, | ||
'4[44]-3[33]-0[00]': 8, | ||
} | ||
""" | ||
Combination code to the number of moves required to solve statues using ``KSDouble2``. | ||
""" |
Oops, something went wrong.