Steve Carmeli

Steve Carmeli

  • NA
  • 1
  • 1.1k

Calling a method without first calling constructor

Aug 10 2013 5:01 PM
I have a VS 2012 console app, DrawPoker. I have attached it's .Zip. The problem I'm having is that I want to regenerate the deck after each hand but can't. Instead, when I call the constructor, it apparently creates another object that my code does NOT refer to. Therefore the card deck under use diminishes in count and is eventually exhausted.

A concomitant problem I have is that the system overdraws cards. That is, the DealHand() method is called several times per Regenerate() method for some unknown reason. This depletes the Deck object even faster.

I have messages throughout the system indicating system status. Please help.

Thank you,

Steve

Attachment: drawpoker.zip