added canJump() method in figure