public Fruit(Player[] players, int bowlsize, int[] dist)
    {
        this.players = players;
        this.bowlsize = bowlsize;
        this.nfruits = bowlsize * players.length;
        this.fruitDist = dist;

        // generate the preference for each player
        preference = new int[players.length][];
        for (int i = 0; i != players.length; ++i) {
            preference[i] = genPref();
            players[i].init(players.length, preference[i].clone());
        }

        // compute expectation
        expectation = new int[players.length];
        for (int p = 0; p != players.length; ++p) {
            expectation[p] = computeExpectation(preference[p], dist, nfruits, bowlsize);
        }

        // bowl of player of both rounds
        bowlOfPlayer = new int[2][players.length][];

        timeout = new boolean[players.length];

        printConfig();
    }