added the moveInDirection method to move in one direction for a set number of ticks