public boolean isWallCollision()
    {
        for (Wall wall : world.getWalls()) {
            if (snake.getHead().getX()+5 >= wall.getX() &&
                    snake.getHead().getY()+5 >= wall.getY() &&
                    snake.getHead().getX()+ 5 <= wall.getX() + wall.getWidth() &&
                    snake.getHead().getY()+ 5 <= wall.getY() + wall.getHeight()) {
                return true;
            }
        }
        return false;
    }