pinosaur
/
ekitaihs.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deb pkg
[ekitaihs.git]
/
Ekitai.hs
diff --git
a/Ekitai.hs
b/Ekitai.hs
index
6c1609e
..
028373a
100644
(file)
--- a/
Ekitai.hs
+++ b/
Ekitai.hs
@@
-2,27
+2,19
@@
import System.Environment
import System.IO
import qualified Data.Vector as V
import System.IO
import qualified Data.Vector as V
-import qualified Brick as B
import Parse
import Sim
import Render
import Parse
import Sim
import Render
--- ui :: B.Widget ()
--- ui = B.str "hello" <+> B.str "World"
-
main = do
main = do
+ -- handle file stuff
argv <- getArgs
(opts, fname) <- ekitaiOpts argv
handle <- openFile fname ReadMode
argv <- getArgs
(opts, fname) <- ekitaiOpts argv
handle <- openFile fname ReadMode
- contents <- hGetContents handle
- putStr contents
+ contents <- hGetLines handle
hClose handle
hClose handle
- initialState <- buildInitialState $ stringToSim 10 10 contents
- endState <- B.defaultMain ekitaiApp initialState
- print endState
-
--- main :: IO ()
--- main = do
- -- return 0
+ -- start brick
+ ekitaiMain (stringToSim contents) (optTimeStep opts)
+ return 0