public void useCard() { gameRunner.mat[((int)current) - 1] += 10; handRunner.hand[num] = GameRunner.Card.empty; current = (GameRunner.Card) 0; handRunner.shift(); setActive(false); }
public void setCard(GameRunner.Card card) { if ((int)card != 0) { current = card; setImage(gameRunner.getCardName((int)card)); setActive(true); } else { current = card; setActive(false); } }
public void shift() { GameRunner.Card[] newHand = new GameRunner.Card[7]; int n = 0; for (int i = 0; i < 7; i++) { if ((int)hand[i] != 0) { newHand[n] = hand[i]; n++; } } hand = newHand; nextEmpty = n; }