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