junebot
Got.clj meetup
junebot is a small online multiplayer game we wrote by mob programming at the Got.clj meetup. We started it at a meetup in June and kept coming back to it over a few more evenings, until tonight’s session added specs with speclj.
A server built on Aleph keeps the world state (walls, players and shots) in an atom and broadcasts updates; each client draws the grid with Quil, and you move with the arrow keys and fire with space.
Movement on the server is just vectors added to a coordinate:
(def directions
{"N" [0 -1], "S" [0 1], "E" [1 0], "W" [-1 0]})
Source on GitHub: junebot