In my Enemy.class, which Rat.class and Turtle.class extend, they both use a collision method that turns their direction around and reverses their speed. How can I detect which one of these classes is using the method when I change the variables? For instance, when the rat hits the wall, I don't want the turtle to turn around as well.

