diff options
Diffstat (limited to '.stack-work/intero/intero4078i3Z-STAGING.hs')
-rw-r--r-- | .stack-work/intero/intero4078i3Z-STAGING.hs | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/.stack-work/intero/intero4078i3Z-STAGING.hs b/.stack-work/intero/intero4078i3Z-STAGING.hs deleted file mode 100644 index 15be3ec..0000000 --- a/.stack-work/intero/intero4078i3Z-STAGING.hs +++ /dev/null | |||
@@ -1,55 +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 | Qu | O deriving (Show) | ||
10 | --board = V3 <$> [0..8] <*> [0..8] <*> [0] | ||
11 | --board = [(r,c,X) | r <- [0..8], c <- [0..8] ] | ||
12 | |||
13 | lo8 = [0..8] -- list of 8 | ||
14 | initBoard = matrix 8 8 $ \_ -> O | ||
15 | --avail r c b = | ||
16 | |||
17 | --rowOccupied r b = any (== Q) $ getRow r b | ||
18 | placeQueen r c b = board | ||
19 | where | ||
20 | fX = (\ _ -> X) | ||
21 | rowAttacked = mapRow fX r | ||
22 | colAttacked = mapCol fx c | ||
23 | queen = setElem Qu (r,c) b | ||
24 | |||
25 | --placeAll = repeat 8 placeQueen | ||
26 | |||
27 | winnable = undefined | ||
28 | |||
29 | nextOpen board = | ||
30 | |||
31 | solve = | ||
32 | |||
33 | -- placeQueen r c = | ||
34 | |||
35 | --b = getE | ||
36 | |||
37 | --placeQueen r c b = b ^. | ||
38 | |||
39 | -- rand = do | ||
40 | -- g <- newStdGen | ||
41 | -- print $ take 8 $ (randomRs (0, 8) g) | ||
42 | |||
43 | |||
44 | -- try r c = let next b = placeQueen r c b | ||
45 | -- in next initBoard | ||
46 | |||
47 | -- try' p = let next b = p b | ||
48 | -- in next initBoard | ||
49 | |||
50 | |||
51 | --res = [ try x y | x <- lo8, y <- lo8 ] | ||
52 | |||
53 | main :: IO () | ||
54 | main = do | ||
55 | putStrLn "Hi" | ||