Completing TicTacToe: Strategies, Undo, and the Live Game

Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.

1

Exercise 1 of 1

Final Polish: Custom Exceptions

Create a `InvalidMoveException` and use it in the `makeMove` logic.

Goal: Implement the logic described below in the embedded editor. Use the "Practice Now" button to start coding.
Practical Lab
Implementation

Final Polish: Custom Exceptions

Create a InvalidMoveException and use it in the makeMove logic.

Try implementing this on your own first!
✦

Test Your Understanding

Multiple choice — select an answer to see the explanation.

1 / 1

When reversing turns in Undo, why is (index - 1 + size) % size used?

Hands-on Labs

Practical exercises to master the concepts.

Practical Lab
Implementation

Final Polish: Custom Exceptions

Create a InvalidMoveException and use it in the makeMove logic.

Try implementing this on your own first!
Practice: Completing TicTacToe: Strategies, Undo, and the Live Game — Interactive Exercises | Durgesh Rai