Skip to content

Commit

Permalink
add examples verifying neighbors calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Oct 2, 2023
1 parent 995c6c5 commit 7c02a2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shimmers/sketches/pawns.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
:when (not= :missing (get grid pos :missing))]
pos))

(comment
(neighbors (make-grid 5 5) [2 2])
(neighbors (make-grid 5 5) [0 0]))

(defn assign-target [state pos]
(assoc-in state [:grid pos :target] {:items 0}))

Expand Down

0 comments on commit 7c02a2e

Please sign in to comment.