X-Git-Url: https://git.danieliu.xyz/?p=ekitaihs.git;a=blobdiff_plain;f=Ekitai.hs;h=028373a2631cf410e89c18a54874d3a2d086c5ba;hp=6fe1195234d822b5dd13faeeef1c7d767e9f7e79;hb=HEAD;hpb=c68579ccc2b03996eec6ac5c1526d6e5d20c3c78 diff --git a/Ekitai.hs b/Ekitai.hs index 6fe1195..028373a 100644 --- a/Ekitai.hs +++ b/Ekitai.hs @@ -1,21 +1,20 @@ 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 :: IO () main = do - initialState <- buildInitialState - endState <- B.defaultMain ekitaiApp initialState - print endState - -- argv <- getArgs - -- (opts, fname) <- ekitaiOpts argv - -- return 0 + -- handle file stuff + argv <- getArgs + (opts, fname) <- ekitaiOpts argv + handle <- openFile fname ReadMode + contents <- hGetLines handle + hClose handle + -- start brick + ekitaiMain (stringToSim contents) (optTimeStep opts) + return 0