I updated the form http://www.4shared.com/rar/0gXAY4w7/LetItRide.html
I see a lot of different bugs in my game.
But the main thing is when the last two cards displayed(cardDealer1 and cardDealer2) the game either subtracts or adds the money. But how would I display second round of cards, and 3rd and 4th( you know what I mean)? Just like in this game http://www.freepoker.com/free-let-em-ride-poker
When you click continue two times, it should either let you rebet ( new round) or select new bet.
Vulpes, I did send you the info to log in to my 4shared, so you dont have to wait
Loading
VulpesPosted Feb 28, 2012, 5:01 PM
http://www.c-sharpcorner.com/Forums/Thread/163093/passing-values-from-one-form-to-another-form.aspx
Anyway, I've been playing the free online poker game and the first thing I noticed is that, after a game has been completed, a label pops up to tell you what your hand was - pair of 7s, Ace High etc and whether the player or the house won.
There was no way that we could reproduce that as the code in the Hand class stood so I've rewritten it so that we now have the necessary information to pop up a messagebox (you can use a label if you prefer):
You'll notice that the DetermineHandByType() method is now doing most of the work (and has acquired an 'out' parameter to describe the result) and a number of the previous methods have been eliminated and the others changed slightly.
You need to make some changes to the Game.PayOutMoney method to accomodate the above:
Another thing I've noticed that the online game doesn't feature the bet ranges which yours does.
However, your lowest range 5 to 25 dollars doesn't really make sense, when you allow a $1 bet. Perhaps it would be better to change this range to 1 to 25 dollars.
Basically, you need to reset the game (apart from the player's money) before each new deal but, before we come to that, I'd make the above changes first.
Prime bPosted Feb 28, 2012, 5:44 PM
Also the bet range, is not me, its my teacher, its one of his requirements. lol I would love not to implement it, less headache
User Story:
The user will start the game. Upon game start, the user will be given a random amount of money. This amount will be between $100-1000. The user will then choose from three different betting limits (minimum bet – maximum bet), $5-100, $25-500 and $50-1000. The user will then begin the game loopyou can read the requirements here
http://www.4shared.com/file/6H4yor8c/c_charp_project_2_requirements.html?refurl=d1url
Updated form here
http://www.4shared.com/rar/cAsHisJq/LetItRide.html
Prime bPosted Feb 28, 2012, 5:40 PM
//private bool IsRoyalFlush()
//{
// return IsStraightFlush() && hand[4].FaceValue == "Ace";/* && Is there an Ace? */;
//}
//private bool IsStraightFlush()
//{
// return IsStraight() && IsFlush();
//}
//private bool IsFourOfKind()
//{
// return (hand[0].FaceValue == hand[3].FaceValue) || (hand[1].FaceValue == hand[4].FaceValue);
//}
//private bool IsFullHouse()
//{
// return ((hand[0].FaceValue == hand[1].FaceValue) && (hand[2].FaceValue == hand[4].FaceValue)) ||
// ((hand[0].FaceValue == hand[2].FaceValue) && (hand[3].FaceValue == hand[4].FaceValue));
//}
//private bool IsFlush()
//{
// string suit = hand[0].Suit;
// for (int index = 1; index < 5; index++)
// {
// if (hand[index].Suit != suit) return false;
// }
// return true;
//}
//private bool IsStraight()
//{
// int prev = hand[0].GetNumericValue();
// for (int index = 1; index < 5; index++)
// {
// int next = hand[index].GetNumericValue();
// if ((next - prev) != 1) return false;
// prev = next;
// }
// return true;
//}
//private bool IsThreeOfAkind()
//{
// return (hand[0].FaceValue == hand[2].FaceValue)
// || (hand[1].FaceValue == hand[3].FaceValue)
// || (hand[2].FaceValue == hand[4].FaceValue);
//}
//private bool isTwoPairs()
//{
// return ((hand[0].FaceValue == hand[1].FaceValue) && (hand[2].FaceValue == hand[3].FaceValue))
// || ((hand[0].FaceValue == hand[1].FaceValue) && (hand[3].FaceValue == hand[4].FaceValue))
// || ((hand[1].FaceValue == hand[2].FaceValue) && (hand[3].FaceValue == hand[4].FaceValue));
//}
//private bool IsTensOrBetter()
//{
// return ((hand[0].FaceValue == hand[1].FaceValue) && hand[0].GetNumericValue() >= 10)
// || ((hand[1].FaceValue == hand[2].FaceValue) && hand[1].GetNumericValue() >= 10)
// || ((hand[2].FaceValue == hand[3].FaceValue) && hand[2].GetNumericValue() >= 10)
// || ((hand[3].FaceValue == hand[4].FaceValue) && hand[3].GetNumericValue() >= 10);
//}
and
//Sort();
//if (IsRoyalFlush()) //royal flush
//{
// result = HandType.ROYAL_FLUSH;
//}
//else if (IsStraightFlush()) // Straight Flush
//{
// result = HandType.STRAIGHT_FLUSH;
//}
//else if (IsFourOfKind()) //Four of a Kind
//{
// result = HandType.FOUR_OF_A_KIND;
//}
//else if (IsFullHouse()) // Full House
//{
// result = HandType.FULL_HOUSE;
//}
//else if (IsFlush()) // Flush
//{
// result = HandType.FLUSH;
//}
//else if (IsStraight()) // Straight
//{
// result = HandType.STRAIGHT;
//}
//else if (IsThreeOfAkind()) // Three of a Kind
//{
// result = HandType.THREE_OF_A_KIND;
//}
//else if (isTwoPairs()) //two of a Kind
//{
// result = HandType.TWO_PAIRS;
//}
//else if (IsTensOrBetter()) //10s or better
//{
// result = HandType.TENS_OR_BETTER;
//}
//return result;
Prime bPosted Feb 28, 2012, 5:22 PM
Prime bPosted Feb 27, 2012, 7:38 PM
Well, teacher told me not to worry about multiple players. The play is the only player and he is playing against himself i guess? But here is one links for the rules so you don't have to look for them:
http://www.coolcat-casino.com/table-games/let-em-ride.php
http://www.letstalkwinning.com/Let-It-Ride.htm
http://www.letitride.org/rules/
I think 3 links is enough, what else do you need tell me, also I attached the requirements and you can see the in 4share
VulpesPosted Feb 27, 2012, 7:21 PM
Incidentally, your game appears to be allowing for multiple players but the one you're trying to copy only seems to allow for one?