LLDHub
Problems·Tic Tac Toe Game
L1 · Easy

Tic Tac Toe Game

Problem

Design a Tic Tac Toe game supporting 2 players (human or AI) on an N×N board.

Requirements

  • Support configurable board size (3x3, 4x4, etc.)
  • Two players: can be Human or AI
  • Track turns and switch between players
  • Detect win conditions (row, column, diagonal)
  • Detect draw condition
  • Allow game reset

Constraints

  • Board size N means N-in-a-row wins
  • AI makes random valid moves (no need for minimax)
✓ Saved