Question: Please provide full answer with comments better to understand it is just beginning of c++ so please don't use advances teqniques. I will add screenshots
First is main.cpp second is tictactoeboard.h, third tictactoe.cpp thank you if you help me with this will be greatly thankful
Download the starter code main.cpp, ticTacToeBoard.h, and ticTacToeBoard.cpp. Do not mod- ify ticTacToeBoard.h. We have provided main.cpp to give you an idea of how we intend to use the functions. ticTacToeBoard.cpp must not contain a main function. You may not use global variables. We may take off up to 20% of the total marks for poor style; make sure to name your variables reasonably, indent properly, and comment sufficiently. Submit ticTacToeBoard.cpp. Problem 1: (Tic-tac-toe Write the function implementations for a program that plays the Tic-tac-toe game on a 4x4 board. The winner is determined by 4 consecutive marks of the same kind. Player X goes first, and player 0 goes second. The struct struct ticTac Toe Board int curr-player int points [4.4] encodes the state of the game. curr-player 1 means it's X's turn to play. curr-player --1 means it's o's turn to play. points 4*4] contains the moves made so far. An empty point has value 0, a point marked X has value 1, and a point marked o has value -1. The procedure void print Board (ticTacToe Board board) prints the board. The definition of printBoard is provided, and it will clarify the meaning of ticTacToe Board. The procedure void init Board (tic TacTo e Board& board) initializes the board. Since X goes first, initBoard must set board.curr-player to 1. Since the board is empty at the beginning of the game, initBoard must set all values of the array board points to 0. The predicate bool isEmpty (tic TacToe Board board int x, int y); checks if the point (x,y) is empty and therefore available to play The procedure void mark (tic TacToe Board & board. int x, int y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
