You could save yourself a little nesting in your calls to swap! like so:
replace (swap! game (fn [g] (merge g {:running false, :game-over true}))))
with
(swap! game merge {:running false, :game-over true})))
Or an even more fun to think about one, replace:
(swap! game #(update-in % [:running] not)))
with
(swap! game update-in [:running] not))
On Sun, Aug 17, 2014 at 10:58 AM, Tamas Szabo <[email protected]> wrote:
> Hi,
>
> I've wrote a Tetris to play around with core.async.
> If anyone is interested you can play it here:
>
> http://tamas-szabo.com/tetris/
>
> Hosted on GitHub:
>
> https://github.com/sztamas/tetris
>
> Thanks,
>
> Tamas
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.