Tic Tac Toe Program help?

Bool firstMove = true; if (firstMove == true) { for (int I = 0; I ='1'. Since it is homework I'll leave it to you to look up an ascii chart to find out what it does equal.

Bool firstMove = true; if (firstMove == true) { for (int I = 0; I Edit It also looks like the you have confused chars with ints, in DisplayBoard you set each board tile to be equal to it's corresponding number(the for statement above), but when you check this in the getMove function you use the character equivalents:if (c == '1' && board0 == '1'). 1! ='1'.

Since it is homework I'll leave it to you to look up an ascii chart to find out what it does equal.

Ahh very helpful! But I am still have trouble displaying the numbers on the board. It just does not show despite assigning each one in boardi using for.

– user868756 Jul 29 at 5:50 I see! But for some reason I cannot get my display board to show the numbers o. O I only get spaces and | lines.

Unless I do char board 9 = { '1', '2'} That is the only time the numbers would show up on the board. Sorry I am kind of noob in programming. You have helped me enough.

– user868756 Jul 29 at 6:41.

When a program ends, all of its memory is reclaimed by the operating system so that it can be used by other programs. All values in variables and arrays are lost when a program ends. If you want to maintain some persistent state until the next time the program is run, you need to save your variables/arrays to some storage medium like a file or a database.

When the program is later started, you load those variables/arrays back from the storage medium. If they didn't teach you how to read/write files yet, then I doubt they expect your game board to be restored to it's previous state every time your program starts.

That is true but I am having a hard time maintain the X's and O's in each box without them turning back to 1 2 3 boxes – user868756 Jul 29 at 6:02.

Rather than filling the board with numbers and then overwriting with X's and O,s you should just take an input in an integer format. That might help with the overwriting problem. Also, I don't know if you've covered 2D Arrays or not, but it would help your programming and logical thought process a bit more if you used them.

P. S try implementing a computer vs. Player mode to test your programming skills. – viraj Jul 29 at 18:32.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions