Montag, 16. Januar 2012

all of my godDAMN HATE

Hi everyone,
yeah, yeah, monday again. Every week the same, old feeling of trading free-time for work Trading 2 days of endless fun for 5 days of sleepyness and strange people roaming around you.

But that's not what im ragining about. Last week I told you that I'm working on my C++ skills and I thought of a program which is quite complex (for me).

Let me tell you about it:
Its a gambling game where you have a better chance of winning the higher your bet is.
At first you choose how many players are playing. Then my programm tells you that you have 100 points and there are 5 rounds to play.
Each round you can choose if you want to set points for increasing your winning chance or not. Then a random number generator generates a number between 1 and 100 for every player. The number of points you have set gets added to your random number and the player with the highest end-number wins the round. Everyone looses his bet expect the winner of the round who gains his random number as extra points.
If you dont have anything to bet anymore, you still play the game and get a random number each round but your chances to win are lower then the chances of your opponents.
After 5 rounds, the one with the highest number of points wins the game.

Sounds good and is rather complicated (for me) but somehow my program just wont work. I get stuck in an infinite loop and I just can't find out why.... aaaAARGH RAGE!
But sadly (and in like most situations of life) rage doesn't do anything so I just have to calm down, step back a few steps, take a deep breath and then look at it again.

Next status report when I'm right before destroying this world or when I have finished the "game".

Bye

19 Kommentare:

  1. As someone who's only been working in C++ for 2 months (longer in Java though) this doesn't seem all that hard to be honest :P

    Check every loop and check if their conditions are met. Direct output to the console, use breaks or, if you're feeling fancy, log to a text file and see how often loops are executed and why it's not stopping. Infinite loops are usually quite easy to fix as long as you know how to look and how things can go wrong.

    AntwortenLöschen
  2. Thats bad, you forget about one letter and program doesynt work :/

    AntwortenLöschen
  3. How sensitive is your code? You could always upload it to pastebin or something so we could take a better look at it.

    AntwortenLöschen
  4. I know nothing about programming. :(

    AntwortenLöschen
  5. It should be an interesting game, congratulations.

    AntwortenLöschen
  6. Interesting read! Can't wait for more

    AntwortenLöschen
  7. Wow. I had to reread that several times to figure out how that would actually work. I wish you luck, dude.

    AntwortenLöschen
  8. you can never finish "the game" ack i just lost "the gamme"

    AntwortenLöschen
  9. Sounds like a fun program, hopefully you'll get it running soon!

    AntwortenLöschen
  10. Hopefully the world will be able to contain the rage that is you! haha Good luck with the program.

    AntwortenLöschen
  11. The post I was commenting on just disappeared...

    AntwortenLöschen
  12. haha try posting on Daniweb about it man, I'm there to help.

    Or you could PM it or something crazy, and I can fix it.

    AntwortenLöschen