-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.hs
47 lines (36 loc) · 967 Bytes
/
Main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module Main where
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT
import qualified Callbacks as Callbacks
-- NEW MAIN
initDisplay :: IO ()
initDisplay = do
initialDisplayMode $= [DoubleBuffered]
initialWindowSize $= Size 800 600
createWindow "Zertz"
Callbacks.registerCallbacks
lineSmooth $= Enabled
polygonSmooth $= Enabled
blend $= Enabled
blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
hint LineSmooth $= DontCare
hint PolygonSmooth $= DontCare
main :: IO ()
main = do
(progname, _) <- getArgsAndInitialize
initDisplay
mainLoop
-- OLD MAIN
-- run_minimax str_state =
-- let state :: Zertz.ZertzState
-- state = read str_state in
-- show $ MiniMax.minimax 100 state
-- prompt = do
-- putStr "Move? "
-- IO.hFlush IO.stdout
-- state <- getLine
-- putStrLn $ "\nState: " ++ (run_minimax state) ++ "\n"
-- prompt
-- oldmain = do
-- putStrLn $ "\nState: " ++ (show Zertz.startState) ++ "\n"
-- prompt