Ok, so we(more like you ) fixed the major bugs right, but there are few left
When the last two cards revelead it should distribute the money, it works correct when players wins ( addes the money to the player) but when players loses or wins it should clear up the labels and the only buttons that should be available is chips( if right amount of money is available,If you bet last time 300 lost and now have only 200 left you cant rebet 300), restart, and rebet button.
I believe that's the last bug Vulpes that is holding me from submitting my project.
Loading
VulpesPosted Mar 1, 2012, 4:03 PM
One thing I don't like is that once a bet range has been chosen, the button for that range is enabled so the player can see what the range is. A better idea may be to introduce a label to show the chosen range and then disable all the range buttons. I haven't done that for now but see what you think.
Prime bPosted Mar 1, 2012, 7:34 PM
So I am adding comments to the code so it follows the requirements. I added the animation, so the cards flying now, pretty cool. I created separate thread. You should download the latest version.
Thank you again!
VulpesPosted Mar 1, 2012, 7:16 PM
Prime bPosted Mar 1, 2012, 6:36 PM
Prime bPosted Mar 1, 2012, 4:38 PM
Just in case you need it
Prime bPosted Mar 1, 2012, 4:36 PM
Prime bPosted Mar 1, 2012, 4:35 PM
And Restart button is like whole new game, so it should give the player new amount of money.
Also when player has 0 money left, what happens after? It should same GAME OVER!!!!! lol
Prime bPosted Mar 1, 2012, 4:32 PM
First in this click method I had to add true as a paramter for the game.StartGame
Well then I realize I had to put false in there, so i added false instead of true
private void startButton_Click(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
game.StartGame(true); <<=== added true, otherwise it would give me 0 arguments passed. <<<=== changed to false
startButton.Visible = false;
this.Cursor = Cursors.Default;
dealButton.Enabled = false; // DISABLE DEAL BUTTON UNTIL BET RANGE IS CHOOSEN
EnableChips(false);
ActionButtons(false);
EnableRangeBet(true);
dealButton.Enabled = false;
restartButton.Enabled = false;
continueButton.Enabled = false;
raiseButton.Enabled = false;
rebetButton.Enabled = false;
But the main error I am getting is once you revealed your cards, and click Rebet, it gives me FormatException was unhandled at
private void rebetButton_Click(object sender, EventArgs e)
{
playerbet = Convert.ToInt32(anteLabel.Text); <<===format exception.
game.ClearBet();
hasRaised = false;
if (game.Bet(playerbet))
{
anteLabel.Text = "";
raiseLabel.Text = "";
raise2Label.Text = "";
ClearHand();
restartButton.Enabled = false;
ActionButtons(true);
rebetButton.Enabled = false;
anteLabel.Text = Convert.ToString(playerbet);
game.Deal();
And the last thing is when you click deal ,your bet amount disappears(anteLabel)