start on reading file
[ekitaihs.git] / Ekitai.hs
index 62e1341..6c1609e 100644 (file)
--- a/Ekitai.hs
+++ b/Ekitai.hs
@@ -1,11 +1,28 @@
 import System.Environment
+import System.IO
+
+import qualified Data.Vector as V
+import qualified Brick as B
 
 import Parse
 import Sim
+import Render
+
+-- ui :: B.Widget ()
+-- ui = B.str "hello" <+> B.str "World"
 
 main = do
     argv <- getArgs
     (opts, fname) <- ekitaiOpts argv
-    putStrLn fname
-    return 0
+    handle <- openFile fname ReadMode
+    contents <- hGetContents handle
+    putStr contents
+    hClose handle
+    initialState <- buildInitialState $ stringToSim 10 10 contents
+    endState <- B.defaultMain ekitaiApp initialState
+    print endState
+
+-- main :: IO ()
+-- main = do
+    -- return 0