예제 #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);
 }
예제 #2
0
 public functionalUnit(string ident, point3 mypoint)
 {
     location = mypoint;
     ID       = ident;
 }
예제 #3
0
파일: Gallium.cs 프로젝트: Bartonbr/Seminar
    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;

                }
    }
예제 #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;
        }
예제 #5
0
 public functionalUnit(string ident, point3 mypoint)
 {
     location = mypoint;
     ID = ident;
 }