made enemy and hero not go through walls

only set new position when backgroundtype of new position is not wall