import java.util.ArrayList; public class Computer { private ArrayList hand = new ArrayList<>(); public Computer(Deck drawDeck) { for (int i = 0; i < 7; i++) { hand.add(drawDeck.deal()); } } // FIXME make a better system for this public Card getCardToPlay(Card upCard) { for (Card c : hand) { if (c.canBePlayed(upCard)) { return c; } } return null; } }