示例#1
0
 private void SetLiveElementOnMap(LiveElement element, List <Point> coordinates)
 {
     foreach (Point point in coordinates)
     {
         this.Fields[point.X, point.Y] = new Field(element);
     }
 }
示例#2
0
        private List <Point> CreatePoints(LiveElement element, int sizeX, int sizeY)
        {
            Direction    direction  = new Direction();
            Point        startPoint = direction.GetStartPoint(sizeX - element.Health, sizeY - element.Health, sizeX, sizeY);
            List <Point> result     = new List <Point>();

            for (int i = 0; i < element.Health; i++)
            {
                result.Add(new Point(startPoint.X, startPoint.Y));
                result.Add(startPoint);
                startPoint = direction.AddVector(startPoint);
            }

            return(result);
        }