Created
April 29, 2012 17:18
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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