TOC - prev - next - javadoc tree

2.8. Location concept

A Location is the location of a player.

A Location has either:

or

A Location is represented by the Location class.

A Strategy can obtain a copy of a Location from a Player object. All of the above data are visible.

Position and direction

If the Player is on a Segment (rather than at a Junction), his Location has a position and direction.

The position indicates the Player's distance from the Segment's A-Junction. It is always positive, and less than the Segment's length.

The direction indicates whether the player is moving toward the A-Junction, or toward the B-Junction. (Once started on a Segment, a player must continue to the other end.)


TOC - prev - next - javadoc tree