Sha256: 1d35fb2cac0b44f017abbcfbb77836721cd49b99c4a7d2cb18cef5692c36d3f6
Contents?: true
Size: 291 Bytes
Versions: 262
Compression:
Stored size: 291 Bytes
Contents
module QueenAttack open System let abs (x:int) = Math.Abs x let canAttack (row1, col1) (row2, col2) = if row1 = row2 && col1 = col2 then failwith "The queens cannot be positioned at the same place." else row1 = row2 || col1 = col2 || (row1 - row2 |> abs) = (col1 - col2 |> abs)
Version data entries
262 entries across 262 versions & 1 rubygems