Example #1
0
 public bool unitAreaOccupied(point3 p)
 {
     foreach (functionalUnit a in unitArray)
     {
         if (a.location.x == p.x && a.location.y == p.y && a.location.z == p.z)
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
 public functionalUnit(string ident, point3 mypoint)
 {
     location = mypoint;
     ID       = ident;
 }
Example #3
0
    public point3 translatePoint(point3 point, int side)
    {
        switch (side) {
                case 0:
                        return new point3 (point.x, point.y + 1, point.z);
                case 1:
                        return new point3 (point.x, point.y - 1, point.z);
                case 2:
                        return new point3 (point.x, point.y, point.z + 1);
                case 3:
                        return new point3 (point.x + 1, point.y, point.z);
                case 4:
                        return new point3 (point.x, point.y, point.z - 1);
                case 5:
                        return new point3 (point.x - 1, point.y, point.z);
                default:
                        return null;

                }
    }
Example #4
0
        public bool unitAreaOccupied(point3 p)
        {
            foreach (functionalUnit a in unitArray) {
                                if (a.location.x == p.x && a.location.y == p.y && a.location.z == p.z) {

                                        return true;
                                }
                        }
            return false;
        }
Example #5
0
 public functionalUnit(string ident, point3 mypoint)
 {
     location = mypoint;
     ID = ident;
 }