-stringToSim :: Int -> Int -> [Char] -> Simulation
-stringToSim w h st =
- _stringToSim st [(x, y) | x <- [0..w-1], y <- [0..h-1]] (initSimSpace w h)
+-- stringToSim :: [String] -> Simulation
+stringToSim strings =
+ _stringToSim st grid (initSimSpace w h)
+ where stripped = strings
+ w = maximum $ [(length s) | s <- stripped]
+ h = length stripped
+ grid = [(a,b) | a <- [0..(length stripped)-1], b <- [0..(length $ stripped !! a)-1]]
+ st = concat stripped
+