where is my logic flawed ??? (making font counter)

Started by
11 comments, last by graveyard filla 20 years, 1 month ago
Fair enough, but LuckyNewbie''s method is much safer and more robust, as it does not rely on any previous state. Not to mention the fact that it can be used in situations where the score increments by more than one point at a time.
You are not the one beautiful and unique snowflake who, unlike the rest of us, doesn't have to go through the tedious and difficult process of science in order to establish the truth. You're as foolable as anyone else. And since you have taken no precautions to avoid fooling yourself, the self-evident fact that countless millions of humans before you have also fooled themselves leads me to the parsimonious belief that you have too.--Daniel Rutter
Advertisement
I know the Pong clone is done, but I just wanted to say to LuckyNewbie that the score display algorithm is a pretty smart idea also. I never thought of getting digits recursively, either (based on his aside). Good job!

[edited by - Sluginator on March 4, 2004 6:38:31 PM]
Basically, there is a infinite or practically infinite set of things, that includes things such as pluto and quicksort and special relativity, and fart of ant in some specific hive.-Dmytry
I would recommend using a regular integer, and then learning how to use SDL_TTF. SDL_TTF accepts a character array as the display text, so just use the itoa function (found in stdlib.h) to convert the integer to a proper displaying char array. It's rather simple to do, and it is much easier to manage an actual integer for the score.

By the way: Focus on SDL is written in generic C/C++, until the later chapters, where you are given some nice example classes / class concepts.

[edited by - xempest on March 5, 2004 9:31:11 AM]

This topic is closed to new replies.

Advertisement