Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns battleship.logic)
- (defrecord Cell [x y clicked? ship?])
- (defn make-grid []
- "This initializes an empty grid. The grid is sized 10 x 10. Each cell stores
- its coordinates, whether it has been clicked or not and if it contains a ship."
- (vec (for [y (range 10)]
- (vec (for [x (range 10)]
- (->Cell x y false false))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement