示例#1
0
Move AIShell::makeMove(){
    //this part should be filled in by the student to implement the AI
    //Example of a move could be: Move move(1, 2); //this will make a move at col 1, row 2
    
    //std::pair<Move, int> bestMove = makeMoveMinMax(3, gameState, AI_PIECE);
    //std::pair<Move, int> bestMove = makeMoveAlphaBeta(3, gameState, AI_PIECE, -1000, 1000);
    std::pair<Move, int> bestMove = IDSearch();
    
    return bestMove.first;
    
}
示例#2
0
// A timer process for the ID search (threaded)
static void __cdecl BasicSearchTimerProc(LPVOID hWnd) 
{
	int result;
	// search only when it's not current updating weather.
	if (CheckSearch())	
		result = IDSearch(sID, searchId);

	// broadcast the search result
	ProtoBroadcastAck(WEATHERPROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)searchId, 0);

	// exit the search
	searchId = -1;
}