Question: intro to C++ class using graphics TIC-TAC-TOE Open the home page Your Assignment Your goal is to write a Tic-Tac-Toe game. You should set up
intro to C++ class using graphics
TIC-TAC-TOE Open the home page Your Assignment Your goal is to write a Tic-Tac-Toe game. You should set up the Tic-Tac-Toe boxes and record the alternating X's and O's with mouse clicks. When all 9 boxes are full, the game ends and the user should be prompted for another game. At each move, you should prompt the user for a mouse click, indicating whether it is X's or O's turn. You may assume that X always gets the first move. The program ends when the user enters a negative response to the endgame prompt. Note that each game you will draw exactly 9 objects (5 X's and 4 O's). Your program should not repeat the procedure for drawing an X or O more than necessary. That is, you should loop your drawing command rather than simply repeating code multiple times. You should use a proper while loop structure What you DON'T have to do: The user will choose all X and O locations; you are not expected to write a Tic-Tac-Toe playing program. You may assume that the user knows how to play the game. You are not responsible for tracking poor mouse clicks by the user, such as not clicking within a box or a user clicking all 9 X's and O's in the same box. You may assume that the game ends when 9 mouse clicks are recorded (presumably filling the 9 boxes). You should output a "Game Over" statement at the end of each game, but you are not responsible for determining who won
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
