Thread: Java
View Single Post
Old 10-12-2004, 01:46 PM   #27
Rogue
10 GOSUB Abandonia
20 GOTO 10
 
Rogue's Avatar

 
Join Date: Nov 2004
Location: Afrim, Albania
Posts: 2,113
Default

The move part has to be done in different way.

You have to have a lot of if statements.


You start to move (no mather of direction)

1 - if is floor, move

2. if is not floor - check if is the wall

3. if is wall, don't move

4. if is box, check next space

now same procedure (same stuff) with next box

1. if is floor, move

2. if is not floor, check if is the wall

3. if is wall, don't move

4. if is box, check the color

5. if is same color go to next box

6 if is different color color, don't move

You can move only in 4 directions, this make it easy!
Rogue is offline                         Send a private message to Rogue
Reply With Quote