[Haskell-cafe] Re: Simple game: a monad for each player
apfelmus at quantentunnel.de
Fri Apr 9 06:17:59 EDT 2010
Gwern Branwen wrote:
> Yves Parès <limestrael at gmail.com> wrote:
>> But when running the game, the program cannot "switch" from a player's monad
>> to another.
>> Do you have any suggestion?
> Your desires remind me of the MonadPrompt package
> <http://hackage.haskell.org/package/MonadPrompt>, which IIRC, has been
> used in some game demos to provide abstraction from IO/test
> harness/pure AI etc.
The game demo can be found by chasing links from the package documentation:
There's also my package "operational"
which implements the same concept. It's throughly explained here:
More information about the Haskell-Cafe