-
help with scoring
I am writing an application to stimulte the game of paper, rocks and scissors.
We are supposes to maintain the score through multiple roudns and report
it in teh end. I have all of teh application complete except the scoring
part. If you k now of any way to keep score in a game as simple as this...please
let me know. The game is the user against the computer. I have declared
to variables: humpts and cptrpts...and set them equal to 0. Then i put a
series of IF statements, dependsing on what was typed in. I am jsut not
sure on how to keep up with the score. Please help
-
Re: help with scoring
This has been answered previously. What problems are you having exactly?
All you have to do declare humpts and cptrpts as class int variables or
static int variables within a function. To increment the score you should
do something similiar to '++cptrpts;' or '++humpts;'. Should be pretty
simple...
"coco" <lander_gal@yahoo.com> wrote in message
news:3aae6572$1@news.devx.com...
>
> I am writing an application to stimulte the game of paper, rocks and
scissors.
> We are supposes to maintain the score through multiple roudns and report
> it in teh end. I have all of teh application complete except the scoring
> part. If you k now of any way to keep score in a game as simple as
this...please
> let me know. The game is the user against the computer. I have declared
> to variables: humpts and cptrpts...and set them equal to 0. Then i put a
> series of IF statements, dependsing on what was typed in. I am jsut not
> sure on how to keep up with the score. Please help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|