Menu

Project: Tic Tac Toe

Introduction

It's time to put your OOP skills to the test by building a command-line Tic Tac Toe game. This project will exercise your understanding of classes, game logic, and user input handling.

Requirements

  1. Build a playable Tic Tac Toe game that runs in the terminal.
  2. Use OOP — create classes for Board, Player, and Game.
  3. The board should display after each move.
  4. Validate moves (no overwriting occupied cells).
  5. Detect win conditions and draws.
  6. Allow players to play again without restarting the program.

Hints

  • Represent the board as a list of 9 elements (or a 3x3 nested list).
  • Check rows, columns, and diagonals for wins.
  • Use input() for player moves.

Support me!

I am a software engineer giving back to the community - my name is Musila Peter. Join me in empowering learners around the globe by supporting SaneGenius!