help needed plz

im creating a program for my gr 11 final project and need some help with collision detection. The detection is for a maze game and i dont want the character to be able to go through walls. Can anyone help?
[212 byte] By [megan.mcdonalda] at [2007-11-26 15:42:54]
# 1
if( move position == occupied ){ dont move }
TuringPesta at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...
# 2
Im programming in java. Ive tried to use that line and it dint work, ive even tried replacing some parts with bits of code from my program and it didnt work
megan.mcdonalda at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...
# 3

"It didn't work" is a spectactularly useless statement. It conveys almost no actual information whatsoever.

How about you do this.

1) Post your formatted (see http://forum.java.sun.com/help.jspa?sec=formatting) code showing what you are doing now

2) Tell us what the expected behaviour is and what is happening now

3) Copy and paste any error messages you get at compile or runtime here

cotton.ma at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...
# 4
i no longer need help. I have found a way to compare the placement of the character to the placement of the walls using multiple if statements
megan.mcdonalda at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...
# 5
but thank you anyway and thank you TuringPest
megan.mcdonalda at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...
# 6
> but thank you anyway and thank you TuringPestWell glad that you got it working but if you have more questions in future do consider providing more information so that you can actually be helped.
cotton.ma at 2007-7-8 22:01:47 > top of Java-index,Java Essentials,Java Programming...