looking for 'trail' object
I'm looking for a class in the Java APIs that will help me with the following:
I'm programming a game. In the game, I have something like a train or a centipede. It's basically a chain of objects that moves around like a snake. What I'm looking for is something like a trail or path, something that can be traced or iterated. The head element in the chain would create the trail as it moves along, the middle elements would simply follow the trail, and the last element would delete the trail as it passes over it.
I'm looking for this trail object so that I have a way to determine how the elements in the chain (except the head) will move (i.e. they'd just follow the trail). Is there such a thing?