Re: the snake game with core.async and swing

2013-08-06 Thread Andreas Liljeqvist
+1 for Daniels suggestion. Swing can be quite bothersome if you just want a canvas and key-events. I would avoid multimethods: (defn calc-new-pos [xy prev-pos dir] (condp = [xy dir] [:x :right] (+ prev-pos step) [:x :left]) (- prev-pos step) [:y :down] (+ prev-pos step) [:y :up]

Re: the snake game with core.async and swing

2013-08-04 Thread Daniel
Or quil, a processing wrapper, would be well suited to this application. -- -- 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 patie

Re: the snake game with core.async and swing

2013-08-03 Thread Chris Ford
Cool! If you want to make the Swing stuff more idiomatic, you could take a look at Seesaw . On 2 August 2013 17:11, wrote: > Below is a little (stupid) snake game I wrote using core.async and swing. > It uses channels for timer, keyboard input and repaint to