In a java game I am making, I have a player and a wall tile. When the player moves forward, it checks if it collides with the wall in this code:
player.moveFo