Skip to content

“A simple and interactive C++ Tic-Tac-Toe game with clean console UI, 2-player mode, input validation, and organized game logic. This project demonstrates fundamental programming concepts such as loops, functions, condition checking, and board management.”

Notifications You must be signed in to change notification settings

anshull-rajput/Tik-tak-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tic-Tac-Toe (C++)

A simple and interactive Tic-Tac-Toe game built in C++, featuring:

✔ 2-Player Local Mode ✔ AI Mode using Minimax Algorithm ✔ Clean console UI ✔ Input validation & error handling ✔ Organized & modular code

This project demonstrates fundamental programming concepts such as loops, conditions, game logic, decision-making, and basic AI.


📸 Game Preview (Console Output)

Text

  Tic-Tac-Toe (Console)

==============================

  1. 2-player (Local)
  2. Play vs Computer (You are X)
  3. Play vs Computer (Computer starts as X)
  4. Exit

Choose (1-4):


📁 Project Structure

File Description
tictactoe.cpp Local 2-player mode
tictactoe_ai.cpp AI mode using Minimax
output.txt Saved console output preview
README.md Project documentation

🛠 How to Compile (Windows)

Basic Version

g++ tictactoe.cpp -o tictactoe.exe -static-libstdc++ -static-libgcc ./tictactoe.exe

AI Version

g++ tictactoe_ai.cpp -o tictactoe_ai.exe -static-libstdc++ -static-libgcc ./tictactoe_ai.exe


🚀 Features

🧠 AI opponent using Minimax

🎯 Error-free user input

🎨 Clean and readable console UI

🔁 Replay option

🧩 Best for learning C++ game development


👨‍💻 Author

Anshul Rajput Software Developer | C++,Python Developer & AI Enthusiast 👉 GitHub: https://github.com/anshull-rajput



About

“A simple and interactive C++ Tic-Tac-Toe game with clean console UI, 2-player mode, input validation, and organized game logic. This project demonstrates fundamental programming concepts such as loops, functions, condition checking, and board management.”

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages