A collection of beginner-friendly C++ console games and utilities built using Object-Oriented Programming principles.
by Abhishek Rai A · AI & ML Student · Mysore University
Player vs Computer — turn-based console game
┌───┬───┬───┐
│ X │ O │ X │ Player: X vs CPU: O
├───┼───┼───┤
│ O │ X │ │
├───┼───┼───┤
│ O │ │ X │
└───┴───┴───┘
+ ✓ Player X wins! — Diagonal match detected $ Play again? (y/n): y_
Features:
- Win detection — rows, columns, diagonals
- Random CPU moves
- Tie detection
- Turn-based game loop
- Replay mode
Player vs Computer — best of 3 rounds
YOU VS CPU
ROCK SCISSORS
+ Rock crushes Scissors — You Win! Round 1: Win [Rock vs Scissors]
Round 2: Loss [Scissors vs Rock ]
Round 3: Win [Paper vs Rock ]
Score -> Wins: 2 Losses: 1 Draws: 0
$ Enter choice (r/p/s): _
Features:
- Input validation (r / p / s only)
- Random CPU selection using rand()
- Score tracking across rounds
- Replay loop
Menu-driven account manager with deposit/withdrawal logic
┌──────────────────────────────────────────────┐
│ # Transaction Amount Balance │
├──────────────────────────────────────────────┤
│ — Opening Bal — Rs 5,000.00 │
│ 1 Deposit +Rs 2,500 Rs 7,500.00 │
│ 2 Withdrawal -Rs 1,200 Rs 6,300.00 │
│ 3 Deposit +Rs 700 Rs 7,000.00 │
└──────────────────────────────────────────────┘
+ Current Balance: Rs 7,000.00 [1] Deposit [2] Withdraw [3] Balance [4] Exit
$ Enter choice: _
Features:
- Menu-driven interface
- Overdraft protection — cannot withdraw more than balance
- Invalid input handling
- Running transaction history
| Tool | Details |
|---|---|
| Language | C++ |
| Paradigm | Object-Oriented Programming (OOP) |
| IDE | VS Code / CodeBlocks / Dev-C++ |
| Platform | Windows / Linux / Mac terminal |
# Clone the repo
git clone https://github.com/Abhirai2006/Console-mini-projects.git
cd Console-mini-projects
# Compile any project
g++ TicTacToe.cpp -o ttt
g++ RockPaperScissors.cpp -o rps
g++ MiniBank.cpp -o bank
# Run
./ttt ./rps ./bank # Linux / Mac
ttt.exe rps.exe bank.exe # WindowsConsole-mini-projects/
├── TicTacToe.cpp # Tic-Tac-Toe game
├── RockPaperScissors.cpp # Rock-Paper-Scissors game
├── MiniBank.cpp # Mini Banking System
└── README.md # This file