getCurrentLocationFor() public method

public getCurrentLocationFor ( EnvironmentObject eo ) : XYLocation
eo EnvironmentObject
return AIMA.Core.Util.DataStructure.XYLocation
Beispiel #1
0
        public void moveObject(EnvironmentObject eo, XYLocation.Direction direction)
        {
            XYLocation presentLocation = envState.getCurrentLocationFor(eo);

            if (null != presentLocation)
            {
                XYLocation locationToMoveTo = presentLocation.locationAt(direction);
                if (!(isBlocked(locationToMoveTo)))
                {
                    moveObjectToAbsoluteLocation(eo, locationToMoveTo);
                }
            }
        }