public Card chooseCard(Deck deck, PlayerCPU playerCPU) {
		String input;
		Scanner sc = new Scanner(System.in);
		Card card;
		boolean pull = true; // if true, user can pull a card

		while (true) {
			System.out.print("Choose a card: ");
			input = sc.nextLine().toLowerCase().trim().
			                replaceAll("\\s+", " ");
			if (input.equals("p")) { // pull card
				if (pull) {
					card = deck.dealOneCard(this, playerCPU);
					cards.add(card);
					System.out.print("You pulled: ");
					System.out.println(card.shortdesc());
					pull = false;
				} else {
					System.out.println(
					         "You already pulled a card.");
				}
			} else if (input.equals("f")) { // fold
				if (!pull) {
					return null;
				} else {
					System.out.println("You can't fold. " +
					      "You should pull a card first.");
				}

			} else { // play a card
				card = Agonia.findCard(input, cards);
				if (card == null) {
					System.out.println("You have not " +
					                   "such a card.");
				} else if (card.num() != 1
				&& card.num() != deck.downcard().num()
				&& card.suit() != deck.downsuit()) {
					System.out.println("You can't play " +
					                   "this card.");
				} else {
					return card;
				}
			}
		}
	}