Question
Part 3: Upgrading Tic Tac Toe Following our discussion about code upgradability, we are going to practice upgrading a piece of code. To do this,
Part 3: Upgrading Tic Tac Toe Following our discussion about code upgradability, we are going to practice upgrading a piece of code. To do this, we are going to upgrade the tic tac toe code from ICS3U. If you couldnt get your code working for that assignment, dont worry, youre provided with solution code. Your task for this assignment is to upgrade the tic tac toe game such that it works for an NxN size board. The way it is programmed now, the code creates a 3x3 board. You should expand the program so that it asks the user to input the size of board they would like to play with (up to 15x15), then proceeds to play the game with updated rules according to the board size. The computer move program should work the same way, the only difference in the game is that now the user/computer must obtain N in a row, rather than 3. This can still be obtained in 3 ways: horizontally, vertically and diagonally. Finally, pick a function from the tic tac toe code and analyze its run-time based off the input board size N. Make sure to include comments to outline the sections you upgraded and the logic behind it all.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started