[Kde-games-devel] Re: KPoker and the card images

Andreas Beckermann b_mann at gmx.de
Thu Aug 26 23:00:02 CEST 2004


On Thursday 26 August 2004 22:41, Inge Wallin wrote:
> > > 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.

This is not about how applications store the card numbers, but how the card 
images are stored.
Noone prevents you from placing cards with a small value to a lower position 
in your array.
However it absolutely makes sense to name the image files like this. Imagine 
they would have been names
1.png ... 4.png = 7 of foobar
5.png ... 8.png = 8 of foobar
9.png ... 12.png = 9 of foobar
[...]
by some application coder who uses card 7...Ace only.

Now some other application coder need 2..6, too so how should he name the 
files? -3.png to 0.png for 6 of foobar?

Using this scheme you could even add a 1 of foobar without problems. 
Furthermore anyone who writes an application that uses 7..Ace only can easily 
load all files 1.png to whatever.png without coping with indices here.
Finally you could also add carddecks that provide 7..Ace only. But we don't 
support that anyway :)

I think it's only a matter of taste anyway, but I _guess_ that were the 
reasons for this decision. If you want a definite answer you should try to 
find the one who made it :-)

> > > 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?

I am talking about the carddeck files in cvs here. 1.png is always the same 
card. 10.png is always the same card. 52.png is always the same card (...)

>  -Inge

CU
Andi


More information about the kde-games-devel mailing list