[Kde-games-devel] A new highscore manager - KScoreManager

Burkhard Lehner burkhard.lehner at googlemail.com
Thu May 1 22:17:12 CEST 2008


Hi,

Sorry for again throwing in my two cents, although not contributing to the
actual implementation.

2008/5/1 Matt Williams <matt at milliams.com>:

> > - It's missing an "int numberOfScores() const" method. I don't really
> > love that name, but I haven't been able to come up with anything much
> > better. Maybe "scoreBoardLength"?
>
> Yes, scoreBoardLength() sounds good. In that case I'll change
> setNumberOfScores() to setScoreBoardLength().


I just want to remind you that there is a difference between the number of
highscore entries shown in the highscore dialog, and the number of entries
stored in the highscore list.

If these two numbers don't match, you may get in trouble:
1) display more entries than stored: the lower entries always remain empty
2) store more entries than displayed: the player who just won a new low
highscore doesn't find himself in the list, and the dialog also does not
show a box where he could enter his name

So, I think there is no sense in using a different number of entries for
storing and displaying.
Furthermore, the number should be fix, i.e., set only once in the program,
and never changed. Otherwise you loose highscore entries, or create empty
ones.
Therefore, the number of entries is predestined to be set in the constructor
of the KScoreManager, isn't it? (Maybe use a default value of 10?)

Burkhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20080501/d717202d/attachment.html 


More information about the kde-games-devel mailing list