Implement and check dynamic arrays in java

Asked By 20 points N/A Posted on -
qa-featured

Make and run a program that will allow the 2 users that will act as a player to a participate in XOX game. I'm very new to java so can you please help me with this?

SHARE
Best Answer by Michelle Bang
Best Answer
Best Answer
Answered By 55 points N/A #91163

Implement and check dynamic arrays in java

qa-featured

I am not much familiar with the java but I can give you a general idea.

First of all define two objects that would be two players who will be playing the game.

Now do some of the graphics work by using built in APIs that would give you the graphical look of the game.

Now define the two objects and assign them the signs, tick and cross.

Now define a check that if tick=1 then next will be the cross turn. This can be handled with a loop or if condition.

You can do all of this in a loop of 9 because in XOX game you have 9 blocks. So the array would be of 3×3. Now check if there are three consecutive signs at any places then say that the sign wins the game.

Answered By 0 points N/A #195121

Implement and check dynamic arrays in java

qa-featured

 

Hi Monica Lewis,
 
There are a lot of sample codes out there available in the net. You can use any of the 2 links below which contains complete code with explanation of how to create Tic-Tac-Toe game.
 
Hope it helps.

 

Related Questions