"Eli Ford" <[EMAIL PROTECTED]> wrote:

> Is there a better way than IORefs
> 
Without looking at the code: The state Monad. Imperative
implementations of games are usually[1] modelled as finite automata,
there's no reason to do it any different in a functional language. Add
a bit of glue to translate input events into input symbols and output
symbols into graphics, sound and general joyful multimedia goodness and
some strings to tell your automata that it's supposed to switch to a
new state each frame and you're set.

[1] That is, I know of no counterexamples, except broken automata where
clueless code monkeys update the game state while drawing onto the
screen and similar atrocities.

-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to