aboutsummaryrefslogtreecommitdiffstats
path: root/solver.py
diff options
context:
space:
mode:
Diffstat (limited to 'solver.py')
-rwxr-xr-xsolver.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/solver.py b/solver.py
index 7bf7055..ff53960 100755
--- a/solver.py
+++ b/solver.py
@@ -55,16 +55,6 @@ def is_swappable(kana1, kana2):
return False
-def test_is_swappable():
- assert is_swappable(Kana("norm"), Kana("norm"))
- assert is_swappable(Kana("froz"), Kana("norm"))
- assert is_swappable(Kana("norm"), Kana("empt"))
- assert is_swappable(Kana("empt"), Kana("froz"))
- assert not is_swappable(Kana("norm"), Kana("rock"))
- assert not is_swappable(Kana("froz"), Kana("froz"))
- assert not is_swappable(Kana("empt"), Kana("empt"))
-
-
class KanaGrid:
valid_types_for_chain = ("froz", "norm", "rock")
@@ -235,37 +225,6 @@ class KanaGrid:
)
-def test_kana_grid():
-
- inital_grid = [
- kana_void , Kana("myst", "su"), kana_void , Kana("myst", "ko"), kana_void ,
- Kana("froz", "se"), Kana("empt" ), Kana("empt" ), Kana("empt" ), Kana("froz", "so"),
- Kana("froz", "ku"), Kana("empt" ), Kana("empt" ), Kana("empt" ), Kana("froz", "no"),
- kana_void , kana_void , Kana("rock", "ka"), kana_void , kana_void ,
- ]
- initial_grid_size = 5, 4
- chain_target = 7
-
- expected_grid = [
- kana_void , Kana("myst", "su"), kana_void , Kana("myst", "ko"), kana_void ,
- Kana("empt" ), Kana("empt" ), Kana("empt" ), Kana("froz", "se"), Kana("froz", "so"),
- Kana("froz", "ku"), Kana("empt" ), Kana("empt" ), Kana("empt" ), Kana("froz", "no"),
- kana_void , kana_void , Kana("rock", "ka"), kana_void , kana_void ,
- ]
-
- kanagrid_orig = KanaGrid(initial_grid_size, initial_grid)
- kanagrid_new = kanagrid_orig.action(pos=(0, 1), action_type="right")
-
- print("kanagrid_orig")
- print(kanagrid_orig)
- print("kanagrid_new")
- print(kanagrid_new)
- print("expected_grid")
- display_grid(expected_grid, initial_grid_size)
-
- assert kanagrid_new.grid == expected_grid
-
-
def repr_grid(grid, grid_size):
lines = []
kana_iter = iter(grid)