Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

# tic tac toe help!

### #1 sigfrid Posted 17 June 2006 - 03:31 PM

sigfrid

Member

• Member
• 42 posts
I need to make the game called TIC TAC TOE(in java) using a three structure, the thing is, that i have to use a predetermined node, to make the three, and i need to make it run on an aplication, i have little idea of what to do, but little is not enought i have to use one of this two nodes
//this is one
public Nodo(Object o, int nh)
{
elemento = new Object[1];
elemento[0] = o;
hijo = new Nodo[nh];
for(int i=0; i<nh; i++)
hijo[i] = null;
cuenta = 1;
}
// this is the other

/**
* Constructor que recibe un arreglo de objetos y nh hijos
* @param o Object[]
* @param nh int
*/

public Nodo(Object o[], int nh)
{
int i, n;
n = o.length;
elemento = new Object[n];
for (i = 0; i < o.length; i++)
elemento[i] = o[i];
hijo = new Nodo[nh];

for(i=0; i<nh; i++)
hijo[i] = null;
cuenta = 1;
}
I was thinking of using a three, inserting in each node a matrix 3*3, i have to automatically generate the posibles moves and make a decision, and i also need to use toogle buttons in the application, instead of just pictures, so i need to make it somehow when you push the toogle button an "X" is written, then, the computer decides, and the toogle button where the computers makes its move must have an "O" on it, so, if any of you could be of any help, please help me .
• 0

### #2 MOLEXRULZ Posted 20 June 2006 - 07:21 AM

MOLEXRULZ

Member

• Member
• 346 posts
I'm sorry that I have no constructive advice but...

DUDE, YOUR CODE IS IN SPANISH!! THATS AWESOME
• 0

### Similar Topics

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users