synchronized public boolean addBid(Player bidder, Bid bid) {
        if (bidder != getNext()) {
            String error = "Deve giocare " + getNext() + " ma ha giocato " + bidder;
            //mazziere.say(error);
            ACLMessage m = new ACLMessage(ACL_ILLEGAL_MOVE);
            m.addReceiver(bidder.getAID());
            m.setContent(error);
            mazziere.send(m);
            mazziere.addBehaviour(lastMessageSent);
            System.out.println("Invalida da " + bidder);
            return false;

        }
        if (bestBid != null && !bid.passo() && bestBid.rank().getValue() <= bid.rank().getValue()) {
            String error = "Offera non valida! Offerto: " + bid + " corrente: " + bestBid;
            //mazziere.say(error);
            ACLMessage m = new ACLMessage(ACL_ILLEGAL_MOVE);
            m.addReceiver(bidder.getAID());
            m.setContent(error);
            mazziere.send(m);
            mazziere.addBehaviour(lastMessageSent);
            System.out.println("Invalida da " + bidder);
            return false;
        }

        //  in case Bid is valid
        if (!bid.passo()) {
            bestBid = justBid = bid;
            bestBidder = justBidder = bidder;
            ++counter;
            computeNext();
            return true;
        }

        // finally, in case it is a pass
        justBid = bid;
        justBidder = bidder;
        ++counter;
        --inGame;
        for (int i = 0; i < bidders.size(); ++i) {
            if (bidders.get(i) != null && bidders.get(i).getAID().equals(
                bidder.getAID())) {
                bidders.set(i, null);
            }
        }
        if (inGame > 0) {
            computeNext();
        }
        return true;

    }