X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=Ekitai.hs;h=6d0c8675a692593c6bf97a10b08e0399dc881ed4;hb=4de2980e358a4ed8bb05e615a3fee16215b03c1f;hp=6b9806ff0c00ce4764bf69a35458de0bd2fbdbb5;hpb=112ba19bd1df10cdb24e99dd3853dd99576c1610;p=ekitaihs.git diff --git a/Ekitai.hs b/Ekitai.hs index 6b9806f..6d0c867 100644 --- a/Ekitai.hs +++ b/Ekitai.hs @@ -2,15 +2,11 @@ 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" - hGetLines :: Handle -> IO [String] hGetLines h = do line <- hGetLine h @@ -21,18 +17,13 @@ hGetLines h = do return (line:lines) main = do + -- handle file stuff argv <- getArgs (opts, fname) <- ekitaiOpts argv handle <- openFile fname ReadMode contents <- hGetLines handle hClose handle - -- putStrLn $ show $ stringToSim contents - initialState <- buildInitialState $ stringToSim contents - endState <- B.defaultMain ekitaiApp initialState - print endState + -- start brick + ekitaiMain (stringToSim contents) (optTimeStep opts) return 0 --- main :: IO () --- main = do - -- return 0 -