The canMove method enables us to check on the displacement in one go. We have keep an eye on both collisions with the wall as well with the pile. If any of these methods returns false, the result should also be false. If not, the result is true. The arguments of these methods can be passed on to the collide methods of Wall and Pile.