AIMA.Core.Environment.XYEnv.XYEnvironment.moveObject C# (CSharp) 메소드

moveObject() 공개 메소드

public moveObject ( EnvironmentObject eo, XYLocation direction ) : void
eo EnvironmentObject
direction AIMA.Core.Util.DataStructure.XYLocation
리턴 void
        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);
                }
            }
        }