Players should only be able to choose positions 0-8. We need to validate the position.
Comparison Operators:
Used to compare values and return true or false.
• < less than
• > greater than
• == equal to
Example:require(age >= 18, "Must be 18 or older");
For Our Game:
The board has positions 0-8 (9 total squares). Any position 9 or higher is invalid.
We can check: _position < 9
This is true for 0, 1, 2, 3, 4, 5, 6, 7, 8 (valid positions)
This is false for 9, 10, 11... (invalid positions)
Add a require statement at the start of makeMove to validate the position is less than 9.