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.

Recommended Answers

All 4 Replies

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 [3][3].

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.