Question: I'm making an online tile based game and I have just finished scripting the piece of code that takes the coordinates of where you are standing and builds the surroundings (tiles) around you (the game is made using a table with many cells that hold the tiles).

I need some help creating a bit of AJAX that can refresh my table every now and then (lets sat every 2 seconds for the sake of this question). I have no experience with AJAX and there would be no point learning it all (even though id like too) as I will only be using it for this small part of my game, plus I do not have time.

This is how my game is set up:

*php*
Some php that gets info on the character.\*
*php*

*html*
Some html that displays the data in a graphical form.
*html*

So what I need is some AJAX that refreshes the php then the html every 2 seconds.

Answer: 
Think of it as websites with links to other sites on them. Let A be our root node or our starting website.

```

A is the starting page    (Layer 1)
A links to AA, AB, AC     (Layer 2)
AA links to AAA, AAB, AAC (Layer 3)
AB links to ABA, ABB, ABC (Layer 3)
AC links to ACA, ACB, ACC (Layer 3)

```

This is only three layers deep. You search one layer at a time. So in this case you would start at layer A. If that does not match you go to the next layer, AA, AB and AC. If none of those websites is the one you are searching for then you follow the links and go to the next layer. In other words, you look at one layer at a time.

A depth first search (its complement) you would go from A to AA to AAA. In other words you would go DEEP before going WIDE.
BEGIN

4;

4,2;

4,2,1; 4,2,3; 4,2,5;

4,2,1;(fail) 4,2,3,6; 4,2,5,6; 4,2,5,11;

4,2,3,6,7;(pass) 4,2,3,6,8; 4,2,5,6,7;(pass) 4,2,5,6,8; 4,2,5,11,12;

4,2,3,6,8,9; 4,2,3,6,8,10; 4,2,5,6,8,9; 4,2,5,6,8,10; 4,2,5,11,12;(fail)

4,2,3,6,8,9;(fail) 4,2,3,6,8,10;(fail) 4,2,5,6,8,9;(fail) 4,2,5,6,8,10;(fail)

END