summaryrefslogtreecommitdiff
path: root/.stack-work/intero/intero4078i3Z-STAGING.hs
diff options
context:
space:
mode:
Diffstat (limited to '.stack-work/intero/intero4078i3Z-STAGING.hs')
-rw-r--r--.stack-work/intero/intero4078i3Z-STAGING.hs55
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 @@
1module Main where
2
3import Control.Lens
4import Linear.V2
5import Linear.V3
6import Data.Matrix
7import System.Random
8
9data 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
13lo8 = [0..8] -- list of 8
14initBoard = matrix 8 8 $ \_ -> O
15--avail r c b =
16
17--rowOccupied r b = any (== Q) $ getRow r b
18placeQueen 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
27winnable = undefined
28
29nextOpen board =
30
31solve =
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
53main :: IO ()
54main = do
55 putStrLn "Hi"