The teacher put an instance of the Enemy class on the World, and an instance of the Direction class in the same row. The teacher adds code to the act() method so that the object moves one step forward.
The teacher explains to the students how to determine whether two or more objects ("characters") on the World are in the same position (on the same cell). The teacher explains the method: isTouching().
The teacher and students modify the act() method of the Enemy class to ensure that the enemy rotates 90° clockwise when it is in the same cell that contains an instance of the Direction class.
Together with the students, the teacher observes what happens with the rotation attribute.