Skip to content

Instantly share code, notes, and snippets.

@kennycason
Created October 9, 2013 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennycason/6910248 to your computer and use it in GitHub Desktop.
Save kennycason/6910248 to your computer and use it in GitHub Desktop.
haskell prob
data GameState = GameState { map :: [[Int]], timer :: Timer }
data GameSprites = GameSprites { sprites :: Surface, samus :: Surface}
newGame :: IO (GameState, GameSprites)
newGame = do
samus <- loadBMP "img/samus.bmp"
sprites <- loadBMP "img/spritesheet.bmp"
map <- [[]]
timer <- start defaultTimer
return (GameState map timer, GameSprites sprites samus)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment