Пример #1
0
 // Check for potential go-again for next turn
 public int goAgain(Board b, int pit, int offset)
 {
     // if the last stone after moving lands in the mancala, return 1
     return((((pit + b.stonesAt(pit)) % 13) == 6 + offset) ? 1 : 0);
 }
Пример #2
0
 /*
  * Evaluate: return a number saying how much we like this board.
  * TOP is MAX, so positive scores should be better for TOP.
  * This default just counts the score so far. Override to improve!
  */
 public virtual int evaluate(Board b)
 {
     return(b.stonesAt(13) - b.stonesAt(6));
 }