[Haskell-cafe] Card games

Felipe Lessa felipe.lessa at gmail.com
Sat Nov 7 05:54:51 EST 2009


Hi!

I would like to know if anybody has already thought of or tried
to code an EDSL for card games.  Ideally you should be able to
write the rules the games and get "for free":

 - Game generator: given an input deck, construct the initial
   state of the game.

 - Random game generator: besides just creating a random deck and
   using the item above, it should be nice to be able to randomly
   construct the game from the final positions.  This should
   guarantee that all random games are solvable.

 - "Hints" generator: IOW list possible moves given a game state.

 - Playable game: probably the EDSL should include at least some
   information to be able to properly place the cards on the
   screen.

 - Game solver: this is somewhat harder to do efficiently, but an
   inneficient one should be doable.

 - Demo mode: related to the above, an auto-play distract-me mode.

 - Tutorial mode: show a screen for each of the rules written?

 - ...anything more?

Just curious, this looks like a perfect job for an EDSL.  Also, I
guess anybody trying to do something like this should read
PySol's code to have some ideas.

--
Felipe.


More information about the Haskell-Cafe mailing list