I need help making a counter uusing a two dimmensional array. I'm doing a tic tac toe program and need about done, just need the counter and have no clue how to do it.
Well you need to provide some requerements how the counter is supposed to work and interact with your existing program, else we will only waste time to come up with something that will be unusable
and what has a 2D array to do with counters anyway?
A counter is just a number after all...
Basically, this is all I need, well, need help starting off with, is when everytime the x wins, count and everytime the o wins count. Basiclly count up how many times player 1 and player 2 wins. My tic tac toe board is made up of a 2d array, thats why .
Just keep two int counters. Why do anything more complicated? There will never be more than two players in the game.
If there were more than two, you could keep their scores in an array, a HashMap, or most any collection.