Beispiel #1
0
 public bool TryNavigate(string navigation, PlateuArea plateuArea)
 {
     for (int i = 0; i < navigation.Length; i++)
     {
         Navigate(navigation[i]);
     }
     return(IsValidPosition(plateuArea));
 }
Beispiel #2
0
        public bool IsValidPosition(PlateuArea plateuArea)
        {
            double upperX = plateuArea.GetUpperRightPoint().X;
            double upperY = plateuArea.GetUpperRightPoint().Y;
            double lowerX = plateuArea.GetBottomLeftPoint().X;
            double lowerY = plateuArea.GetBottomLeftPoint().Y;

            if (_position.X > upperX || _position.X < lowerX || _position.Y > upperY || _position.Y < lowerY)
            {
                return(false);
            }

            return(true);
        }
Beispiel #3
0
 public void SetArea(PlateuArea plateuArea)
 {
     _plateuArea = plateuArea;
 }
Beispiel #4
0
 public Plateu(PlateuArea plateuArea)
 {
     _plateuArea = plateuArea;
 }