+ public void yi(SectorWire sw) {
+ if (!sw.touches(this)) throw new RuntimeException("invalid argument");
+ yi(sw.plane);
+ }
+
+ public void yi(Cell c) {
+ if (c.row==row-1 && c.col==col) yi(SOUTH);
+ else if (c.row==row+1 && c.col==col) yi(NORTH);
+ else if (c.row==row && c.col==col-1) yi(WEST);
+ else if (c.row==row && c.col==col+1) yi(EAST);
+ else throw new RuntimeException("invalid argument");
+ }
+
+ public void wi(SectorWire sw) {
+ if (!sw.touches(this)) throw new RuntimeException("invalid argument");
+ wi(sw.plane);
+ }
+