Collision detection

I have been able to detect collisions between the player and the enemies, using the built in rectangle class in java.


Collisions with the walls is however done differently. I use the board to acquire the coordinates and check on every move if the next space is a wall (0). If it is not, the player  and enemies are allowed to proceed.
Acquiring coordinates

Checking for walls before moving