[Kde-games-devel] Re: KPoker and the card images
Inge Wallin
inge at lysator.liu.se
Thu Aug 26 22:41:02 CEST 2004
On Wed, 25 Aug 2004, Andreas Beckermann wrote:
> On Wednesday 25 August 2004 23:08, Inge Wallin wrote:
> > I am now done writing a PokerHand class that handles all aspekts of (guess
> > what...) a Poker hand. This will ultimately be used to fix bug 30272, a
> > misevaluation of several different hands. However, when i tested it, very
> > strange things happened.
>
> Well, I told you that I have code for these things already, I just need to go
> to that computer (whether I can do that this week depends on things I can't
> control very much). But if you want to do that work now, then of course you
> can spend your time on problems that are fixed already ;-)
Hmm, maybe I misunderstood. I thought you said that you had rewritten
everything and it didn't fit into the current program. Well, anyway, I am
finished now, and will check in my fixes in just a few minutes.
> > 1. Why this order for the suits? The order of the suits, as far as I
> > know, clubs, diamonds, spades and hearts in increasing order.
>
> I don't know. Why not? ;-)
> I don't think there is a special reason. However it doesn't make much sense to
> argue whether it makes sense or not, because that's the way it is.
Agreed.
> Also the "order" of the suits depend entirely on the kind of game you are
> playing. A solitair game will probably use a different order (if any) than a
> poker or a skat game, I guess.
You have a point there. I didn't think about that.
> > 2. Why this order of ranks? Why have the best cards using the lowest
> > indices? Wouldn't the other way around be more intuitive?
>
> Some games use Ace, King, ..., 5, 6, 7 only. Others use all cards, down to 2.
> Therefore it makes sense to name them in a way that you can start at one and
> count up to what you need.
Well, here I don't agree. It makes sense to have bigger cards have higher
numbers. If I compare two cards using the < operator (for instance), then
I bloody well want a six to be less than a seven.
> > 3. Is this a standard order that is defined anywhere? If so, where?
>
> Look at your favorite carrddeck. They all use the same numbering.
Not here in Sweden, they don't. In fact I don't think that I have ever
seen a physical deck of cards with numbers on them. But maybe I
misunderstood again and you meant the deck files in KDE?
> > 4. Wouldn't some other card classes than just images be a good addition to
> > libkdegames? I have written a few for this project that I can brush up
> > and then let you look at and decide if it is a good idea.
>
> We had that idea before, but decided against this, IIRC mainly because every
> game that uses cards provides something like that already anyway and I don't
> see much point in rewriting them so that they all share the same API.
Ok, I don't have any problem with that.
> CU
> Andi
-Inge
Inge Wallin | Thus spake the master programmer: |
| "After three days without programming, |
inge at lysator.liu.se | life becomes meaningless." |
| Geoffrey James: The Tao of Programming. |
More information about the kde-games-devel
mailing list