Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notice that if you click on a square that is taken by the other player, the marker may turn into a question mark. This is

Notice that if you click on a square that is taken by the other player, the marker may turn into a question mark. This is because you have added both X-marker and O-marker classes to the document. If you used className instead of classList you would be able to take over another players square. Also, if you click on your own square you wasted your turn. Modify the event handler to check to see if there is a class on the element already. (Hint: this is a good use of className but there are other ways to do it.) Dont put a marker or count the turn if the square is already taken.

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

Pro Android Graphics

Authors: Wallace Jackson

1st Edition

1430257857, 978-1430257851

More Books

Students also viewed these Programming questions

Question

What was the influence of the individual experimenter?

Answered: 1 week ago

Question

Convert the attached regression analysis data into an excel graph.

Answered: 1 week ago