private void updateGraphics(Hand handToUpdate, int index, bool updateCardOnTop) { List <Button> buttonListToUse = GetButtonList(handToUpdate); // Returns which list of Buttons to use for update. PokerCard card = handToUpdate.GetaCard(index); if (card.isDiscarded) { buttonListToUse[index].Image = BackCard.GetCardImage();; } else { buttonListToUse[index].Image = card.GetCardImage(); } if (updateCardOnTop) { TopCardButton.Image = CardonTopofPile.GetCardImage(); } }
private void ChangeCardinCardPile(PokerCard ACard) { ACard.isDiscarded = true; CardonTopofPile = ACard; TopCardButton.Image = ACard.GetCardImage(); }