Implement and check dynamic arrays in java
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?
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?
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.
Â
Â