All pastes #415685 Raw Edit

izaak

public java v1 · immutable
#415685 ·published 2007-03-29 20:05 UTC
rendered paste body
public Move makeAmove(PlayerPot pot) {		/*if (this.getNumChips() == 0) {			return Move.takeIt;		} else if (Math.random() <= 0.5) {			return Move.takeIt;		} else {			return Move.noThanks;		}*/				if (this.getCards().size() < 3)		{			if (Math.random() <= 0.5) {				return Move.takeIt;			} else {				return Move.noThanks;			}					}				if (this.getNumChips() < 3){			return Move.takeIt;		}		int difference = pot.getUpCard() - pot.getNumChips();		if (difference < 5) {			return Move.takeIt;		}		IntArray cards = this.getCards();		for (int c : cards)		{			if (Math.abs(pot.getUpCard() -c) == 1)				return Move.takeIt;		}		return Move.noThanks;	}