Text Based Tic-Tac-Toe
Hello everyone. It's been a while since I last posted. I just wanted to share this text-based Tic-Tac-Toe game that I made. It checks for ties, can be played multiple times, and keeps score. I hope you guys enjoy and thanks for checking this out!
Cool! Some tips though: don't use using namespace std
, and use '\n'
instead of endl
@DynamicSquid Thanks for the tips. I see so many using std::
instead of using namespace std;
. Why would you not use the second option and avoid writing std::
all the time. Is it just to save 1 line of code?
@Glare What if you have a variable called cout
? Or maybe a function called pow
? It may seems rare, but it's good practice, especially when working with other libraries
@DynamicSquid That's true. I haven't really made a program with the name cout
, but good point though.
hmph i like endl @DynamicSquid
@Summit its slow. Its adds a newline, and flushes the console which is unnecessary most of the time
ur logic is actually so good dude. teach me LOL
@Combustion I'm glad you like it! I'll be making a tutorial soon :)
Me lonely playing this alone :(
@HasheeshEater if he made it an AI that would be so sick fr
@Combustion I think that's the next step. Just have to learn some algorithms first.
I know this is a bit late, but um... here's a bug:
Basically, if you just spam the keys and the enter button, it will just keep printing that even after you stop.
@lightningrock Well of course, you're probably putting char types instead of an int. This is a very basic program it won't expect you to do this. I'll manage this when I make the AI version though ;)
oh ok @Glare
Wow! Nice!
@Coder100 Thanks for playing! Glad you like it :)