Subject: Re: [stella] Card Games - UNO From: <erik@xxxxxxxxxx> Date: Sat, 24 Nov 2001 00:35:29 -0500 |
11/23/2001 7:09:01 PM, "Erik J. Eid" <eeid@xxxxxxxxx> wrote: >At 10:50 PM 11/23/01 -0600, Paul Slocum wrote: >>>I [Glenn Saunders] have been thinking about doing UNO but I haven't >>>really thought about the feasibility of it yet. >>> >>>I used to LOVE Uno. Never mind that, let's see Hot Death Uno implemented on the 2600. http://www.geocities.com/hotdeathuno/ >One challenge I can see is that a person's hand can theoretically grow >almost as large as the deck. (Imagine being on the receiving end of a >series of Draw Two and Draw Four cards, with enough Reverse and Skip cards >thrown in to ensure you never get a turn.) Without a fixed limit, you'd >have to set aside enough RAM for each hand to hold 108 cards, or devise a >structure which is constantly reorganized so that one hand immediately >follows another in memory. For Uno, I think you almost have to approach it from the other direction. Four bits is enough to indicate the whereabouts of each card. There are eleven possible states for each card: in each of the four players hands; played to the current trick by each of the four players; in the discard pile; on top of the discard pile; or in the deck. If each card has four bits to indicate its location, you can store the deck in 54 bytes. Note that, for Uno, you do not have to store the order of the deck or the discard pile. The challenge then shifts from storage to CPU time. I might suggest allocating 8 bytes per player to hold currently-displayed cards. Recalculate those 8 bytes only when they change (the player plays or draws a card or scrolls his hand), and even if it takes a whole frame, that's okay. ---------------------------------------------------- Sign Up for NetZero Platinum Today Only $9.95 per month! http://my.netzero.net/s/signup?r=platinum&refcd=PT97 ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] StellaX, Glenn Saunders | Thread | Re: [stella] Poker Solitaire, build, Manuel Polik |
Re: [stella] BAStella Language Refe, erik | Date | Re: [stella] BAStella Language Refe, Clay Halliwell |
Month |