{-# LANGUAGE MultiParamTypeClasses #-} module Affection.StateMachine where import Affection.Types import qualified SDL -- | Typeclass for simple scaffolding of a state machine class StateMachine us a where -- | State load routine smLoad :: a -> us -> Affection () -- | state update routine smUpdate :: a -> us -> Double -> Affection () -- | State event handler routine smEvent :: a -> us -> [SDL.EventPayload] -> Affection () -- | State draw routine smDraw :: a -> us -> Affection () -- | State clean routine smClean :: a -> us -> Affection ()