Animated Slot Machine Visual Basic

C# Slot Machine in 15minutes: Here i teach you how to make a basic slot machine in 7 minutes, with a further 8 minutes of explanation!

  1. Slot Machine Animated Gif
  2. Slot Machine Tutorial

Hi Everyone,

BasicVisual

It has been some time since I've posted here but I am truly having trouble seeing the forest for the trees so to speak. I have changed my code so many times I missed the time it worked because I want it to do more.

Upon Exit btn click event total winnings and total spent should display in a msgbx. Spin click event shows msgbx with winner and winnings.

I would really appreciate a fresh set of eyes and a shove in the right direction. For some reason it shows only the amtEntered in the text box and 0.00 winnings - as if it is always branching to the else in the btnExit_Click. I'm sure I have some superfluous stuff hanging out in here...pls be kind.

Thanks.

Slot Machine Animated Gif

Slot machine animated gif
  • 2 Contributors
  • forum6 Replies
  • 759 Views
  • 4 Days Discussion Span
  • commentLatest Postby smepperson

Slot Machine Tutorial

The first thing I notice looking at your code is that the 'and-ed' if-statement should be before your 'or-ed' if-statement, because and's will always be false if or's are. I'm not 100% sure, but I think the statements int index3 = new int(); should be replaced by simply int index3 = rand.Next(imageListFruit.Images.Count); like you have for index1. Also, are you sure you need to basically duplicate the code from the GamePlay method in the btnExit_Click method?