Question: / / Initialise bestScore for each player int bestScore; if ( player = = 1 ) / / the AI plays to maximise scores bestScore
Initialise bestScore for each player
int bestScore;
if player the AI plays to maximise scores
bestScore ;
else the Human plays to minimise the AI's scores
bestScore ;
The terminal tests call helper functions elsewhere in the code not included here
ifAIhasWon
return ;
else ifhumanHasWon
return ;
If neither player has won, determine successor states and simulate Minimax gameplay
ArrayListi
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
