![]() |
| ||
| Assistance needed with craps game I am very new to C++. I have to write a program for class that reflects the game of craps and I'm kinda stuck at this point. Any help someone could give me would be HUGELY appreciated. The guidelines we were given are that the program should execute 10000 times to compute the probability of the "player" winning and the "house" winning. Basic game rules are: Player rolls two dice. When the sum is 7 or 11 on first throw, player wins. When the sum is 2, 3, or 12 on first throw, "house" wins. When the sum is 4,5,6,8,9, or 10 on first throw, that sum becomes the player's "point". Now, to win the player must continue rolling the dice until he makes "point"; however should he roll a 7 then the "house" wins. The game ends. My code this far is below. It seems as if my game counter is not updating. Also, how can I make this automated to run the 10000 times without myself having to push the Y or N keys? Thanks to whoever helps me! #include <iostream> |
| ||
| Re: Assistance needed with craps game Also posted on cprogramming.com. Just so you know, seeing the same post on multiple forums doesn't look good to a lot of people. |
| ||
| Re: Assistance needed with craps game Quote:
So, trying to get help anywhere I can is a bad thing? I'm having trouble with a program and am asking for help. |
| ||
| Re: Assistance needed with craps game >>Why doesn't it look good? Because why should I bother to answer here when you might already get answers elsewhere, and you might get conflicting answers at that. |
| ||
| Re: Assistance needed with craps game Quote:
Please don't shun me just for looking for extra help. |
| ||
| Re: Assistance needed with craps game I read multiple posts as this http://catb.org/~esr/faqs/smart-questions.html#urgent You can't be bothered to see if one forum pans out and gives you the answer you need, so you decide to spam a whole bunch of forums and you don't give a damn how many people you piss off in the process so long as you get what you want. In other words, how is this different from a spammer selling snake oil, it doesn't matter to them so long as some schmuck hands over the money. http://catb.org/~esr/faqs/smart-questions.html#forum is another point to ponder. |
| ||
| Re: Assistance needed with craps game >>how can I make this automated to run the 10000 times without myself having to push the Y or N keys? Replace the do loop with a for loop for(int i = 0; i < 1000; i++) |
| ||
| Re: Assistance needed with craps game Quote:
I'm not trying to upset anyone. I'm only trying to get some assistance. If you really feel that I'm acting like a spammer then I'll leave and not come back. I don't have time for this drama. I never thought I'd catch this kind of flak for asking for help. |
| ||
| Re: Assistance needed with craps game >Why doesn't it look good? Because a lot of us visit most of those forums, and seeing an identical thread on each one reeks of spamming and trolling for answers. >I don't see what it matters where else I get answers. It doesn't matter. What matters is that by asking us, then asking another forum, you're basically saying that you don't trust our answers. On top of being insulted like that, those of us that visit all of the forums in question are going to be irritated by having to pick which forum to help you on for maximum effect. That's a lot of work, and while I can't speak for Salem, I'm not willing to go to that kind of effort just to help some faceless net junkie. Also keep in mind that the most qualified helpers are going to be members of most, if not all, of those forums. By alienating us, you risk losing the highest quality answers. >If you really feel that I'm acting like a spammer then I'll leave and not come back. Okay. We don't care if you stay or go. That's completely your decision, regardless of how much you try to focus the blame on other people. Throwing out an ultimatum just makes you look like you're starved for attention. >I don't have time for this drama. I never thought I'd catch this kind of flak for asking for help. Salem is trying to help you. If you piss off the people you're asking for help from, you waste much more time than dealing with the "drama" because they'll simply refuse to help you. So don't give us the wounded little kid routine. It doesn't work. Just accept the criticism and learn from it. |
| ||
| Re: Assistance needed with craps game >Also, how can I make this automated to run the 10000 times without myself having to push the Y or N keys You could employ a malnourished Ethiopian for less than a fiver to hit the 'y' key 10,000 times. The money accrued would help feed him and his family for weeks. |
| All times are GMT -4. The time now is 6:05 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC