Created
November 18, 2019 17:15
-
-
Save fotonmoton/5646fb0e42d34448f3e040239a823fe7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module QueenAttack | |
let create (row, col) = | |
row >= 0 && row < 8 && col >= 0 && col < 8 | |
let canAttack (row1, col1) (row2, col2) = | |
row1 = row2 || col1 = col2 || (abs (row1 - row2) = abs (col1 - col2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment