From: Daniel Liu Date: Sat, 1 May 2021 12:48:31 +0000 (-0400) Subject: not using stack anymore X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=19625d0c9e1d31e1966815bfefba8af794b3dba2;p=ekitaihs.git not using stack anymore --- diff --git a/Ekitai.hs b/Ekitai.hs index e413b67..62e1341 100644 --- a/Ekitai.hs +++ b/Ekitai.hs @@ -1,6 +1,7 @@ import System.Environment import Parse +import Sim main = do argv <- getArgs diff --git a/Sim.hs b/Sim.hs new file mode 100644 index 0000000..bb96fe3 --- /dev/null +++ b/Sim.hs @@ -0,0 +1,18 @@ +module Sim ( ChunkData, initSimSpace, defaultChunkData ) where + +import qualified Data.Vector as V + +data ChunkData = ChunkData + { velocity :: (Float, Float) + , density :: Float + } deriving (Show) + +defaultChunkData = ChunkData + { velocity = (0,0) + , density = 0 + } + +initSimSpace :: Int -> Int -> V.Vector ChunkData +initSimSpace x y = V.replicate (y*x) defaultChunkData + +-- gaussSeidel