示例#1
0
void ExceptionBase::details(bool no_trace) const {
	if (no_trace || !hasTrace()) {
		std::cerr << getError() << std::flush;
	} else {
		std::cerr << getError() << "\n" << getTrace() << std::flush;
	}
}
示例#2
0
文件: test.c 项目: ktain/Slither
void closeUntracedCells(void) {
	int j, k;
	for (j = 0; j < SIZE; j++) {
		for (k = 0; k < SIZE; k++) {
			if (!hasTrace(block[j][k]))
      {
				block[j][k] |= 15;
        if(j < SIZE - 1)
          block[j+1][k] |= 4;
        if(j > 0)
          block[j-1][k] |= 1;
        if(k < SIZE - 1)
          block[j][k+1] |= 8;
        if(k > 0)
          block[j][k-1] |= 2;
      }
		}
	}
}