summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 190e997..28afaa7 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -10,7 +10,10 @@ main = do
10 let n = read $ head args :: Int 10 let n = read $ head args :: Int
11 in putStrLn $ intercalate "\n" $ map show $ solve n 11 in putStrLn $ intercalate "\n" $ map show $ solve n
12 12
13data Square = O | X | Qu deriving (Show, Eq) 13-- representation of the state of a square on the board, which can either a
14-- Queen (Q), be under attack by a Queen (X) or open/available (X)
15
16data Square = Qu | X | O deriving (Show, Eq)
14 17
15solve :: (Eq n, Num n) => n -> [Matrix Square] 18solve :: (Eq n, Num n) => n -> [Matrix Square]
16solve n = nub $ solveN n 19solve n = nub $ solveN n