public HandHistory(string MicrosoftAccount, int CreditCount, Hand Open, Hand Close, string GameName, DateTime HandDate, bool SnapFlag, string platform) { MicrosoftAccountID = MicrosoftAccount; Credits = CreditCount; GameType = GameName; OpenHandCard1 = Int32.Parse((Open.Cards[0].Suit.ID).ToString() + (Open.Cards[0].Value.Number)); OpenHandCard2 = Int32.Parse((Open.Cards[1].Suit.ID).ToString() + (Open.Cards[1].Value.Number)); OpenHandCard3 = Int32.Parse((Open.Cards[2].Suit.ID).ToString() + (Open.Cards[2].Value.Number)); OpenHandCard4 = Int32.Parse((Open.Cards[3].Suit.ID).ToString() + (Open.Cards[3].Value.Number)); OpenHandCard5 = Int32.Parse((Open.Cards[4].Suit.ID).ToString() + (Open.Cards[4].Value.Number)); CloseHandCard1 = Int32.Parse((Close.Cards[0].Suit.ID).ToString() + (Close.Cards[0].Value.Number)); CloseHandCard2 = Int32.Parse((Close.Cards[1].Suit.ID).ToString() + (Close.Cards[1].Value.Number)); CloseHandCard3 = Int32.Parse((Close.Cards[2].Suit.ID).ToString() + (Close.Cards[2].Value.Number)); CloseHandCard4 = Int32.Parse((Close.Cards[3].Suit.ID).ToString() + (Close.Cards[3].Value.Number)); CloseHandCard5 = Int32.Parse((Close.Cards[4].Suit.ID).ToString() + (Close.Cards[4].Value.Number)); HeldCard1 = Close.Held[0]; HeldCard2 = Close.Held[1]; HeldCard3 = Close.Held[2]; HeldCard4 = Close.Held[3]; HeldCard5 = Close.Held[4]; Outcome = Close.Check(GameName); IsSnapped = SnapFlag; Platform = platform; DatePlayed = HandDate; }
public VideoPokerGame(string GameType) { PayTable = LoadPayTable(GameType); Deck = new Deck(GameType); Hand = new Hand(); Deal(); }
private void Deal() { if (!IsShowingCards) { if (!IsDrawingCredits) { StopPayTableAnimations(); ResetBox.Visibility = Visibility.Collapsed; if (!HoldRound) { ClearHolds(); ResetCardBacks(); ChargeCredits(); DisableShareButton(); PokerGame = new VideoPokerGame(GameType); handCounter++; HoldRound = true; HandStart = new Hand(PokerGame.Hand.Cards, PokerGame.Hand.Held); } else { PokerGame.Draw(); ResetCardBacks(); ActivateShareButton(); HoldRound = false; HandEnd = new Hand(PokerGame.Hand.Cards, PokerGame.Hand.Held); } ShowCards(!HoldRound); } } }