Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.
Exercise 1 of 1
Refactor a `Cell` that uses `isOccupied: boolean` and `isX: boolean` to use a single `CellStatus` enum.
Refactor a Cell that uses isOccupied: boolean and isX: boolean to use a single CellStatus enum.
Multiple choice — select an answer to see the explanation.
Why are Enums preferred over Booleans for player types?
Practical exercises to master the concepts.
Refactor a Cell that uses isOccupied: boolean and isX: boolean to use a single CellStatus enum.