Hello, I'm still new in this language. I almost finish learning bucky's vid about c++. And today I'm thinking about making a simple board game, like tic tac toe or smth, is tic tac toe too hard for beginners ? Or do you people have an idea which can be learnt by beginners ? I can practice a lot in making stuffs like this. Thank you !
NB: English is not my main language, so sorry for some wrong spelling or grammar hahahah
1. Define your problems
-make tic tac toe
2. Tasks
-make a board
a. I keep thinking about dimensional arrays
b. make a board with 3 rows and 3 columns
-make an object. XO
a. pointer, function that replaces one of the dimensional arrays
-call the user to input
a. takes parameters, [][]
-if 3 x or o is aline then the user wins
a. if 3 lines are the same, the user wins.
I don't know what it's called, but I was told to make this from internet tutorial. Is it right ?
Well its a things to do list. I'm not sure you could call it right or wrong. You can follow this or decide you own path, its up to you. As long as you are learning I don't think it matters quite how you implement it yet. I don't imagine you will sell many copies of tic tac toe no matter how its implemented.
You should think, layout whats required to play t t toe and build each little thing and put them together. When you come across something you haven't got a clue on how to do. Put a comment in your code as a placeholder and comeback to it or break it into smaller pieces that you can chew, and if that doesn't work you can always come here and ask about a specific thing.
things you need:
- a board or place to put your o's x's that can be displayed easily in a 3x3 grid.
- your o, x's.
- A way to let you put your o, x's on the grid
- a way to display the board
- a way to check for invalid moves
- a way to check for a winning condition after every move
- a way to keep track of whose move it is
- a way to tell the winner they are awesome so they can rub it in the losers face :P