Re: [stella] Poker Solitaire

Subject: Re: [stella] Poker Solitaire
From: "B. Watson" <urchlay@xxxxxxxxxxxxxxxx>
Date: Thu, 22 Nov 2001 12:30:45 -0500 (EST)
On Thu, 22 Nov 2001, Chris Wilkson wrote:

> Hi Brian,
> A suggestion for your scoring.  Just have a massive CASE statement.
> Here's some pcode:
>   case (hand #1)
>     when (royal flush)
>       statements
>     when (royal straight)
>       statements
>     ...
>     ...
>     when (3 of a kind)
>       statements
>     when (pair)
>       statements
>   end

That's the easy part... the hard part is being `the Human Compiler' and
translating that to 6502 asm :)

> This way, your check will bail when it gets to 3 of a kind, and will never
> even check for a lowly pair.  I've forgotten the rank of particular hands,
> but I think you get the idea.

Yep. Except you can legitimately have 3 of a kind and still have a pair
(made of the other 2 cards), in which case you have a Full House.. If CPU
time weren't important, I'd have a separate `Check for Full House', but as
it is I have to check for 3 of a kind, then continue checking for a pair..

Actually, I'm having to score during the overscan (Vblank is almost all used
up), and I've only got time to score one hand per frame.. What I'd really
like to do there, is skip a few frames between the scoring of each hand, so
you can watch your score `count up'..

> And here's another idea.  There are 2 special, mutually exclusive flags
> I think.
>   1) Do you have all royal cards?  (A,K,Q,J,10)
>   2) Are the cards all the same suit.

Not mutually exclusive (having both flags set means you got a royal flush)..
I still haven't decided whether to make a royal flush worth more points than
a regular straight flush (I've found 2 sets of rules online and one in an
`official' Hoyle book, and all 3 of them say to score a royal flush the same
as any other straight flush). Perhaps that should be a difficulty switch

> check each of 1) and 2) and add some points for one or both.
> I don't know how or if this could work, since I don't remember what
> beats what, but it's a thought.
> -Chris

Actually, `what beats what' isn't really an issue.. If it were, the scoring
routine would have to be more complex. All I have to do is classify each
hand (`look, I got a straight' or `I got 3 of a kind') rather than rank them
(`my ace-high straight beats your 10-high atraight' or `my 3 10's beat your
3 6's').

At the moment I've got it scoring only the first horizontal hand, which it
does correctly as far as I can tell (I have yet to get a straight flush)..

...but I've got the day off & maybe 6 hours to spend on this, so I might
surprise myself & finish it today (well, finish the scoring anyway)


Archives (includes files) at
Unsub & more at

Current Thread