bool deadNum(int); int compute(int); int main() { int max, min, size, whoseTurn, compTakeOff, youTakeOff, mode; - initialize random number generator - introduce the game of Nim and display its rules - determine who goes first and the initial number of marbles - deal with the case when computer plays stupid while the number of marbles is >= 1 if it’s user’s turn, prompt user to enter a number if the number is invalid, prompt user to enter another one if it’s computer’s turn, draw a random legal number of marbles switch turn - deal with the case when computer plays smart while the number of marbles is >= 1 if it’s user’s turn, prompt user to enter a number if the number is invalid, prompt user to enter another one if it’s computer’s turn, draw a number of marbles based on the strategy switch turn } /* precondition: n must be a positive integer postcondition: return true if n is 1 less than any power of 2; return false otherwise */ bool deadNum(int n) { - same } /* precondition: n must be a positive integer postcondition: return the number of marbles smart computer should draw */ int compute(int n) { - same }Let's look at the next step!◀ The Game of Nim - Step 1▶ The Game of Nim - Step 3