On 14/06/12 07:27, Tassilo Horn wrote:
I quickly glanced over your code.  Why do you still have `undo`?  That
shouldn't be needed in a fully immutable world.  If you make a move just
for trying out, then simply don't reset! your atom with the new value of
the current board.

Undo is still there cos I want to have an undo button on my gui for people to undo their moves after they've been properly executed (not just tried)...in other words it is not there to help with the recursion any more...I don't know if you noticed but i have a 'try-move' fn which just calls move without resetting the atom, an 'execute' which resets the atom with the result of 'try-move', and an 'undo' which again does not reset the atom...So it is only through 'execute' that the world can be changed and it is always the atom that changes - not like before when the world could change without touching the atom...


Jim

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to