Skip to content

Instantly share code, notes, and snippets.

@mistercam
Created April 29, 2012 17:18
Show Gist options
  • Save mistercam/2552038 to your computer and use it in GitHub Desktop.
Save mistercam/2552038 to your computer and use it in GitHub Desktop.
Function maps a mouse position to a row and coordinate on the Reversi board
(defn parse-mouse-pos [x y]
"Returns the row and column corresponding to the mouse position."
[(quot y (+ piece-size gap-size))
(quot x (+ piece-size gap-size))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment