Avoiding collision with the walls

Related: