This is a simple console-based implementation of the Tic-Tac-Toe game written in Kotlin as part of hyperskill project practice.
- Run the program in a Kotlin environment.
- The game initializes with an empty 3x3 grid.
- Players take turns entering coordinates (row and column) to make a move.
- The grid is updated after each valid move.
- The game ends when a player wins or when there is a draw.
- The program provides feedback for invalid moves.
- The
printGridfunction is used to display the current state of the Tic-Tac-Toe grid. - The
checkWinnerfunction determines if a player has won based on the current grid. - The
isGridFullfunction checks if the grid is completely filled, indicating a draw. - The main game loop handles player moves, validates input, and checks for a winner or draw.
Compile and run the Kotlin code using your preferred Kotlin environment or command line.