module Graphics.FreeGame.Simple (
Game
,GameAction
,GameParam(..)
,defaultGameParam
,runSimple
,runSimple'
,drawPicture
,getButtonState
,getMousePosition
,getMouseWheel
,embedIO
,quitGame
,tick
,untick
,untickInfinite
,untickGame
,Picture(..)
,Bitmap
,loadBitmapFromFile
,loadBitmaps
,loadBitmapsWith
,Vec2(..)
,Font
,loadFont
,text
,randomness
,degrees
,askInput
,getMouseState
,module Graphics.FreeGame.Input
,module Graphics.FreeGame.Data.Color
)
where
import Graphics.FreeGame
import Graphics.FreeGame.Data.Color
import Graphics.FreeGame.Input
import Control.Monad
import Control.Monad.Free
runSimple :: GameParam
-> world
-> (world -> Game world)
-> IO ()
runSimple param initial m = void $ runGame param $ looping initial where
looping world = do
world' <- m world
tick
looping world'
runSimple' :: GameParam
-> world
-> (world -> forall m. MonadFree GameAction m => m world)
-> IO ()
runSimple' param initial m = void $ runGame' param $ looping initial where
looping world = do
world' <- m world
tick
looping world'