Maze game in Java