diff options
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 5 |
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 | ||
13 | data 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 | |||
16 | data Square = Qu | X | O deriving (Show, Eq) | ||
14 | 17 | ||
15 | solve :: (Eq n, Num n) => n -> [Matrix Square] | 18 | solve :: (Eq n, Num n) => n -> [Matrix Square] |
16 | solve n = nub $ solveN n | 19 | solve n = nub $ solveN n |