Tic-Tac-Toe Clone

Hi all! I have recently finished up learning the basics of C++. I have been wanting to move into windows programming, but I feel I still need more practice . I was told to make a tic-tac-toe clone to see if I have mastered the fundamentals. I was wondering if this could be done in a console application, or if I would have to use a graphics API, such as OpenGL, or DirectX to handle my project? also were would one get started on this project? If anyone could lend me a hand I would really appreciate it!
Last edited on
If your content to run the program without a graphical interface, I have Michael Dawsons version of the classic in his game programming book. Basically, he manipulates a vector with a number of functions, its pretty cool.
You could do it in a console application, using a 2d array and cout'ing the array each time a choice is made.
"I have recently finished up learning the basics of C++"

Have you done any real projects yet, besides the not-real-world ones shown in the material you read? If not, then use the simplest cout'd ASCII graphics you can for the project, and focus on the actual logic code, not the graphics. This gives you an opportunity to figure out how to best organize your code into classes in a real programming situation. You can't really do this for tic-tac-toe, but for slightly more complex games like Tetris you can.

In my personal experience, where I really started to get good at programming was when I took up iterative design as a method of learning. Just take a simple project (Pac-man or Tetris are good examples, I did small recursive descent parsers and AST tree generation but most people prefer games), and do that project over and over again until you feel you've figured out a really good, clean way to make the code.

The important thing it to pick a simple project, that you think you can do one iteration of in only a couple days. Then just dive in! It doesn't matter if you screw up and the code is horrible, you'll use that failure to improve when you do the next iteration. This helps you learn how you best do things as a programmer. It also gets you experience, and there's really no substitute for experience in programming.
Last edited on
Topic archived. No new replies allowed.