Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What does this line of code look like? Second, write a method named gameStatus in TicTacToe. This method will take no input and will return

What does this line of code look like? image text in transcribed

Second, write a method named gameStatus in TicTacToe. This method will take no input and will return a value of type GameState, GameState is a new enum that you should implement. GameState should have three values: WIN, DRAW, CONTINUE. The gameStatus method should check the board to see if either player X or player O has won (three in a row), or if the game is a draw (the entire board is filled up, but no one has won), or the game should continue (if there are empty spaces remaining on the board)

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

Students also viewed these Databases questions

Question

How many schools report data to the U.S. Department of Education?

Answered: 1 week ago

Question

how to create a market plan

Answered: 1 week ago