Remember what i chose.

English is not my native language so I have to apologize if it gets a bit tedious to read.

The game is a simple text-based game and I was wondering how to write the code so that the computer REMEMBER the Marble I chose. It also remmeber the stats.

1
2
3
4
5
6
 cout << "Choose one of these: " << endl;
 cout << "A; speed = 4, attack = 3" << endl;
 cout << "Or choose" << endl;
 cout << "B; speed = 2, attack = 5" << endl;
 cin >> input;
 


I have two Marble and when I have used both the computer should say "No more marble". I'll also be adding more marble if some condition is reached.
Last edited on
You're already storing what the use has chosen in that 'input' variable. What else are you needing?
Topic archived. No new replies allowed.