What are Enums?
An enum (enumeration) is a custom type with a limited set of possible values. It makes your code cleaner and safer by giving meaningful names to numbers.
Example:enum Size { Small, Medium, Large }
This creates three values for "Size": Small (0), Medium (1), Large (2)
For Our Tic Tac Toe Game:
Each square on the board can be in one of three states:
• Empty (no one has played there yet)
• X (player X has marked it)
• O (player O has marked it)
Instead of using numbers like 0, 1, 2, we'll use: enum Cell { Empty, X, O }
Note: No semicolon needed here. The closing brace } already marks where the enum ends. Only single statements (like variable declarations) need semicolons.
Your task: Add the Cell enum inside your contract to represent the three possible states of each square.