diff options
author | Steven <steven.vasilogianis@gmail.com> | 2019-06-03 00:08:13 -0400 |
---|---|---|
committer | Steven <steven.vasilogianis@gmail.com> | 2019-06-03 00:08:13 -0400 |
commit | d525371ba284eb78da9d7de075c593ed3a2fca4b (patch) | |
tree | 7b0229419e4c39c730212abe3a1da77d2bfce49c /.stack-work/intero/intero4078i3Z-STAGING.hs | |
parent | a5cb206cca2bd0838f0370a85a1615b6f8761254 (diff) | |
parent | 04f5e6626202e97de12d7f26986cc68e7fdde902 (diff) |
Merge branch 'master' of emmy.childrenofmay.org:public_git/8queens
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" | ||