protected int[] getWinners(String[] hands)
    {
        int j, k, compare_result, nr_winners = this.nrPlayers;
        boolean[] eliminated = new boolean[this.nrPlayers];
        int[] winners;

        for (j = 0; j < this.nrPlayers; ++j) {
            eliminated[j] = false;
        }

        for (j = 0; j < this.nrPlayers - 1; ++j) {
            for (k = j + 1; k < this.nrPlayers; ++k) {
                if (! eliminated[j] && ! eliminated[k]) {
                    compare_result = compareHands(hands[j], hands[k]);

                    if (compare_result == 1) {
                        eliminated[k] = true;
                        nr_winners--;
                    } else if (compare_result == 2) {
                        eliminated[j] = true;
                        nr_winners--;
                    }
                }
            }
        }

        winners = new int[nr_winners];
        k = 0;

        for (j = 0; j < this.nrPlayers; ++j) {
            if (! eliminated[j]) {
                winners[k++] = j;
            }
        }

        return winners;
    }