Skip to content

Commit

Permalink
tidy up example fns (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Gilliard committed May 29, 2013
1 parent a0eed71 commit 1739878
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions rubiks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@
(defn generate-undo-seq [fs]
(mapcat (partial repeat 3) (reverse fs)))

(do
(println "===================")

(let [moves [:F :U :D :R :L]
moved-cube (apply-moves initial moves)
undo-moves (generate-undo-seq moves)
solved-cube (apply-moves moved-cube undo-moves)]

(print-cube initial)
(let [moves [:F :U :D :R :L]
moved-cube (apply-moves initial moves)
undo-moves (generate-undo-seq moves)
solved-cube (apply-moves moved-cube undo-moves)]
(print-cube initial)
(print-cube moved-cube)
(print-cube solved-cube)))
(print-cube moved-cube)
(print-cube solved-cube))

0 comments on commit 1739878

Please sign in to comment.