public void SetCard(ECardRow row, int col, CardValue cardvalue, CardSuit suit) { var card = GetCard(row, col); if (card == null) { return; } card.ImgName = GetCardImageName(cardvalue, suit); }
private CardVM GetCard(ECardRow row, int col) { if (col < 0 || (row == ECardRow.CardsOnDesk && col > 2) || col > 9) { throw new ArgumentOutOfRangeException("col"); } if (row == ECardRow.CardsOnDesk) { return(GamePageVM.CardsOnDesk[col]); } if (row == ECardRow.Cards1) { return(GamePageVM.Cards[col]); } if (row == ECardRow.Cards2) { return(GamePageVM.Cards2[col]); } if (row == ECardRow.Cards3) { return(GamePageVM.Cards3[col]); } return(null); }