Move toward diagnosing state update leak
This commit is contained in:
@@ -16,11 +16,15 @@ import qualified SDL
|
||||
--import Data.Maybe
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import System.Random
|
||||
--import System.Random
|
||||
import Data.Monoid
|
||||
{- | The AI equivalent for your control. -}
|
||||
yourControl :: World -> (World -> World,StdGen) -> Creature -> ((World -> World,StdGen), Maybe Creature)
|
||||
yourControl w (f,g) cr =
|
||||
( (updateUsingInput . f, g)
|
||||
yourControl
|
||||
:: Creature
|
||||
-> World
|
||||
-> (Endo World, Maybe Creature)
|
||||
yourControl cr w =
|
||||
( Endo updateUsingInput
|
||||
, Just . mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed 0 cr
|
||||
)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user