URL
https://opencores.org/ocsvn/connect-6/connect-6/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 7 |
Rev 8 |
Line 217... |
Line 217... |
|
|
// AI makes a move
|
// AI makes a move
|
connect6ai(board,AI_colour,move);
|
connect6ai(board,AI_colour,move);
|
movecount++;
|
movecount++;
|
cout<<"AI MOVE: "<<move[0]<<move[1]<<move[2]<<move[3]<<endl;
|
cout<<"AI MOVE: "<<move[0]<<move[1]<<move[2]<<move[3]<<endl;
|
//if(movecount >=20) return 0 ; //reducing length of simulation
|
if(movecount >=20) return 0 ; //reducing length of simulation
|
winning_colour = check_for_win(board);
|
winning_colour = check_for_win(board);
|
if (winning_colour == AI_colour){
|
if (winning_colour == AI_colour){
|
cout<<"AI has won! " << movecount << " moves " << "Exiting."<<endl;
|
cout<<"AI has won! " << movecount << " moves " << "Exiting."<<endl;
|
break;
|
break;
|
} else if (winning_colour == FPGA_colour){
|
} else if (winning_colour == FPGA_colour){
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.