[gameprogrammer] Re: Good questions

An event queue, like the one SDL uses, seems like the simplest way to
handle that. Each time a creature card comes into play, post an event
of that type; each time a spell is cast, post that type of event, etc.
You should have a list of all cards in play at any given time, and
what their status is (graveyard, hand, in play, etc). Each time an
event is received, pass it to each card, and let the card's code
decide whether anything happens to it (based on that card's current
state, player health, or whatever). More switch statements - one for
each card, but smaller ones. Should be a bit cleaner that way too, I'd
think.

-Justin


--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: