implemented wall and trap detection