コード例 #1
0
ファイル: stored.cpp プロジェクト: DeadOnD/Chess-Game-Viewer
StoredLine::StoredLine(Position* pos) {
	if (storedLineGames == NULL) {      Init();    }

	for (int line = StoredLine::Count(); line > 0; --line) {
		Game * lineGame = storedLineGames [line];
		lineGame->MoveToPly (0);
		bool never_match = false;
        storedLineMatches_[line] = 0;
		if (lineGame->ExactMatch (pos, NULL, &storedLineMoves_[line], &never_match)) {
			if (storedLineMoves_[line].from != NULL_SQUARE) {
				storedLineMatches_[line] = lineGame->GetCurrentPly() + 1;
			}
		} else
			if (never_match) storedLineMatches_[line] = -1;
	}
}