示例#1
0
int score_gen(const OthelloBoard& board,Turn turn) 
{
  int r_score = board.getRedCount();
  int b_score = board.getBlackCount();
  if(turn == RED) 
    {
      if (b_score == 0) 
        {
	  return 100;
	}
      if(r_score == 0)
	{
	    return -100;
	}
      return r_score-b_score;
    }
  else   
    {
      if (r_score == 0) 
        {
	  return 100;
	}
      if(b_score == 0)
	{
	    return -100;
	}
      return b_score-r_score;
    }
}
示例#2
0
int MyBot::countDifference(Turn turn, const OthelloBoard& board){
	int redCount = board.getRedCount();
	int blackCount = board.getBlackCount();
	if(turn == RED){
		return redCount - blackCount;
	}
	else {
	    return blackCount - redCount;
	}	
}