public Action select(int index) {
		Action action = Action.open(index);
		checkAction(action);

		if (twoSelected()) {
			// two cards already opened -> close unpinned ones!
			Card left = cardList.get(getFirstSelectedIndex());
			Card right = cardList.get(getSecondSelectedIndex());
			if (!left.pinned)
				left.selected = false;
			if (!right.pinned)
				right.selected = false;
		}

		switch (getSelection().size()) {
		case 1:
			if (isSelected(index)) {
				// click twice at same card -> if not pinned, close it!
				cardList.get(index).selected = isPinned(index);
			} else {
				// click at another card -> open second card!
				action = Action.open(index, getSelectedIndex());
				checkAction(action);
				cardList.get(index).selected = true;
				stat.compareCount++;
			}
			break;
		case 0:
			// click at first card -> open it!
			cardList.get(index).selected = true;
			break;

		default:
			DEBUGLOG.severe("Invalid index: " + index);
		}
		return action;
	}