Public Group

# Where next?

This topic is 4512 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Right now I am learning C++, I have already gotten a book, and I am currently doing the exercises in it. Right now everything is going fine, I do regular exercises on my own with little to no problems. As of now, I can right the number guessing game with my eyes closed. But I am not really sure where to go from here, so if someone could tell me what would be a good next project it would be helpful. Thanks

##### Share on other sites
How about "Tic Tac Toe"? Create some classes to manage the board and cells, get player input for both sides, evaluate when someone's won, etc.

##### Share on other sites
Just let me make sure I would understand how to do this (more or less).

So I would need to fist set up an array to store the letters in. (I find would be the simplest way to do so). Then I would need to make sure that the player can take turns with the computer? Or does this seems too advanced for me? AI, is something that I'm not quite sure that I'm capable of at this point. If I am not, what yet do I need to learn?

And then I would need to make sure that the program understands when the player wins, and loses. Not to mention, a replay feature, etc.

Correct or no?

##### Share on other sites
Yes. Most of what you describe can be done using while loops, just think about how to deal with the problem.

The AI doesn't need to be complicated, you could introduce some randomness and make decisions based upon how many of the player's symbols are in a row. You could start it off as a two player game.

##### Share on other sites
ok let me make sure my ideas are correct-

Turns- While p1 turn, ask for variable, after ask for variable, p1 turn = false.
Repeat for 2

Assign arrays for the x/o
But what about making it appear?
cout obviously, but more specificly?

thanks

##### Share on other sites
You'll just have to go through each element in your array holding the game data and format it prettily. Here's some pseudocode to get you going:

for (each row)
{
for (each column)
{
cout << Character_Stored_In_This_Row_&_Column
}
cout << "\n"
}

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 32
• 41
• 23
• 13
• 13
• ### Forum Statistics

• Total Topics
631742
• Total Posts
3001986
×