Esempio n. 1
0
 public static string PrettyPrint(Unit unit)
 {
     var res = _PrettyPrint(unit.members, unit.pivot);
     #if DEBUG
     res += "Rotations:\n";
     for (int i = 0; i < 6; ++i)
     {
         res += string.Format("  #{0}: canonical {1}, cells: ", i, unit.GetCanonicalRotation(i));
         Cell[] cells = unit.GetRotatedCells(i);
         foreach (var c in cells)
             res += string.Format("({0}, {1}), ", c.x, c.y);
         res += "\n";
     }
     #endif
     return res;
 }
Esempio n. 2
0
 public void Normalize(Unit unit)
 {
     Rotation = unit.GetCanonicalRotation(Rotation);
 }