Skip to content

Commit a0eed71

Browse files
author
Matthew Gilliard
committed
make the example fns a bit clearer
1 parent dee32bb commit a0eed71

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

rubiks.clj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959

6060
(do
6161
(println "===================")
62-
(let [moves [:F :U :D :R :L]]
63-
(print-cube (apply-moves (apply-moves initial moves) (generate-undo-seq moves))))
64-
)
62+
(print-cube initial)
63+
(let [moves [:F :U :D :R :L]
64+
moved-cube (apply-moves initial moves)
65+
undo-moves (generate-undo-seq moves)
66+
solved-cube (apply-moves moved-cube undo-moves)]
67+
(print-cube initial)
68+
(print-cube moved-cube)
69+
(print-cube solved-cube)))

0 commit comments

Comments
 (0)