From cc5dad63219d9951dcc1117ef6cc49b7751ec517 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 12 Jun 2019 20:45:54 -0400 Subject: Slight refactoring --- src/Main.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Main.hs') 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 let n = read $ head args :: Int in putStrLn $ intercalate "\n" $ map show $ solve n -data Square = O | X | Qu deriving (Show, Eq) +-- representation of the state of a square on the board, which can either a +-- Queen (Q), be under attack by a Queen (X) or open/available (X) + +data Square = Qu | X | O deriving (Show, Eq) solve :: (Eq n, Num n) => n -> [Matrix Square] solve n = nub $ solveN n -- cgit v1.2.3