public Direction flip(Direction d) {
      switch (d) {
      case POSX: return Direction.NEGX;
      case NEGX: return Direction.POSX; 
      case POSY: return Direction.NEGY;
      case NEGY: return Direction.POSY; 
      case POSZ: return Direction.NEGZ;
      case NEGZ: return Direction.POSZ;       
      }
      return null;
    }