diff options
Diffstat (limited to '.stack-work/intero/intero3815n6a-STAGING.hs')
-rw-r--r-- | .stack-work/intero/intero3815n6a-STAGING.hs | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/.stack-work/intero/intero3815n6a-STAGING.hs b/.stack-work/intero/intero3815n6a-STAGING.hs deleted file mode 100644 index 5f6fce5..0000000 --- a/.stack-work/intero/intero3815n6a-STAGING.hs +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | module Main where | ||
2 | |||
3 | import Control.Lens | ||
4 | import Linear.V2 | ||
5 | import Linear.V3 | ||
6 | import Data.Matrix | ||
7 | import System.Random | ||
8 | |||
9 | data Square = X -- Attacked | ||
10 | | Qu -- Queen | ||
11 | | O -- Open/available | ||
12 | deriving (Show) | ||
13 | |||
14 | |||
15 | --board = V3 <$> [0..8] <*> [0..8] <*> [0] | ||
16 | --board = [(r,c,X) | r <- [0..8], c <- [0..8] ] | ||
17 | |||
18 | lo8 = [0..8] -- list of 8 | ||
19 | initBoard = matrix 8 8 $ \_ -> O | ||
20 | |||
21 | firstOpen b = let | ||
22 | elem x y = b ! (x, y) | ||
23 | in map | ||
24 | |||
25 | nextOpen b = | ||
26 | |||
27 | solve = let board = initBoard | ||
28 | |||
29 | --avail r c b = | ||
30 | |||
31 | --rowOccupied r b = any (== Q) $ getRow r b | ||
32 | -- placeQueen r c b = board | ||
33 | -- where | ||
34 | -- fX = (\ _ -> X) | ||
35 | -- rowAttacked = mapRow fX r | ||
36 | -- colAttacked = mapCol fx c | ||
37 | -- queen = setElem Qu (r,c) b | ||
38 | |||
39 | --placeAll = repeat 8 placeQueen | ||
40 | |||
41 | winnable = undefined | ||
42 | |||
43 | nextOpen board = undefined | ||
44 | |||
45 | solve = undefined | ||
46 | |||
47 | -- placeQueen r c = | ||
48 | |||
49 | --b = getE | ||
50 | |||
51 | --placeQueen r c b = b ^. | ||
52 | |||
53 | -- rand = do | ||
54 | -- g <- newStdGen | ||
55 | -- print $ take 8 $ (randomRs (0, 8) g) | ||
56 | |||
57 | |||
58 | -- try r c = let next b = placeQueen r c b | ||
59 | -- in next initBoard | ||
60 | |||
61 | -- try' p = let next b = p b | ||
62 | -- in next initBoard | ||
63 | |||
64 | |||
65 | --res = [ try x y | x <- lo8, y <- lo8 ] | ||
66 | |||
67 | main :: IO () | ||
68 | main = do | ||
69 | putStrLn "Hi" | ||