Ideas for simple text game

I am wanting to practice c++ by making a simple text game. I know about variables, if statements, pointers, functions, and the basics of classes.
I don't fully understand what you mean by a text game.

I you mean a game which communicates to the user through lines of text, hangman is good.

If you mean a game which can run on a console window (a console window is the window which appears when you use int main()), then you can make tic-tac-toe.
Last edited on
A few good text games that I made include a game where you would guess the computer's number. It would generate a random number, say between 1 and 100, then after you guess a number it will say guess higher or lower, then tell you when you guess the correct number.
Another one is where the computer guesses your number!
A trivia game is always nice... You can ask, say, 10 questions. If they get one wrong it's game over. They can have 3 clues... Maybe just base it off of a game show from television.
Not a text game, but a great way to practice your skills, is to make a phone book. Read names, phone numbers, and addresses from a .txt file, be able to append now ones, search through them, and delete them. It is a great way to practice file I/O, functions, and even structs!
I'd love to help you in any way that I can, so feel free to private message me for help or advice. Good luck!

- Kyle
Write a mastermind game. Instead of coloured pegs just use numbers.

I once wrote minesweeper for the console :S Was a mess to play. You had to feed it the x and the y of what you wanted to reveal. Plus my mine generation was completely random, so if you played with <50 mines on a 20*20 board you'd reveal basically the entire board instantly.
Solitaire (the peg version, not the card version) is pretty easy to implement in a console program.
Topic archived. No new replies allowed.