Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using a double dimensional pointer,create a A x B board of variable size that acts as your Tic Tac Toe board Initially fill the board

image text in transcribedimage text in transcribed

Using a double dimensional pointer,create a A x B board of variable size that acts as your Tic Tac Toe board Initially fill the board with " so that if the user asked for a 3 x 3 board it will be 3 rows of 3 Fill in the two functions for Player One's Choice and Player Two's Choice so that whatever position they decide to place their mark (X or O it will reflect on the board when it is printed again. Consistently print the board at the beginning of each loop with the updated values. So if in my first iteration the first player chose (0,1) and the second player (1,0) then by the second loop the board is printed and looks like: Make sure that the players cannot select invalid row/columns. EX: if the board is 3x3 the player cannot choose (2,3) because 3 would cause a segmentation fault as your board only goes only from the values 0-2 for both row and column. board[213] is not a piece of memory that exists In order to determine if the game is over, get user input. If you would like to take on the challenge and actually determine if the game has been won by checking horizontals, diagonals, and verticals it will be extra credit. You may assume in this challenge that the board will be 3x3. Warning: You can technically not use pointers and just use statically created arrays, so we will be randomly checking a number of submissions in order to ensure that this isn't happening. 5 playeroneChodc) /decide on your on return type paraneters 9 playerThoChot.ce)/decide on your on return type +paraneters 1 printboard) //decide on your on return type + persnetters stillplayo //le id.ll also 5sure that the user tall tell us,ren the p e 15 over //if you culd lik to impl" rt Ktal checkirg (if diafral, vertical, ar horizontal is all chr /rthan that W411 ba consldared dtra cracit /you nay asaune the board il only be 3x3 wight cout ot the dth and hight of the board: n cin doth char beard 1Enish the Eni lizationand declartion here //rint: it "ay taka to than one line whale O

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Describe the steps involved in coaching to improve poor performance

Answered: 1 week ago