Exemple #1
0
  /**
   * PlayerHuman sends card he want to lay on table, and computers lays cards automatically.
   *
   * @param card
   */
  public void layCards(Card card) {
    player.cardOnTable(card);
    if (table.getNumberOfCards() == 0) {
      cp.addOnePoint(0);
    }

    for (int i = 0; i < computersTable.size(); i++) {
      computersTable.get(i).cardOnTable();
      if (table.getNumberOfCards() == 0) {
        // Player has index 0
        cp.addOnePoint(i + 1);
      }
    }
  }