mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
Clean up previous patch
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ You can download data from [here](http://rebel13.nl/index.html)
|
|||||||
|
|
||||||
## Convert pgn files
|
## Convert pgn files
|
||||||
|
|
||||||
**Important : convert text will be superheavy (approx 200 byte / position)**
|
**Important : convert text will be superheavy (approx 200 byte / position)**
|
||||||
|
|
||||||
python pgn_to_plain.py --pgn "pgn/*.pgn" --start_ply 1 --output converted_pgn.txt
|
python pgn_to_plain.py --pgn "pgn/*.pgn" --start_ply 1 --output converted_pgn.txt
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ def parse_comment_for_score(comment_str: str, board: chess.Board) -> int:
|
|||||||
score = 0
|
score = 0
|
||||||
|
|
||||||
return score
|
return score
|
||||||
|
|
||||||
def parse_game(game: chess.pgn.Game, writer, start_play: int=1)->None:
|
def parse_game(game: chess.pgn.Game, writer, start_play: int=1)->None:
|
||||||
board: chess.Board = game.board()
|
board: chess.Board = game.board()
|
||||||
if not game_sanity_check(game):
|
if not game_sanity_check(game):
|
||||||
@@ -105,6 +105,6 @@ def main():
|
|||||||
break
|
break
|
||||||
parse_game(game, f, args.start_ply)
|
parse_game(game, f, args.start_ply)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
+10
-6
@@ -53,16 +53,20 @@ void dbg_hit_on(bool c, bool b);
|
|||||||
void dbg_mean_of(int v);
|
void dbg_mean_of(int v);
|
||||||
void dbg_print();
|
void dbg_print();
|
||||||
|
|
||||||
|
/// Debug macro to write to std::err if NDEBUG flag is set, and do nothing otherwise
|
||||||
#if defined(NDEBUG)
|
#if defined(NDEBUG)
|
||||||
template <typename... Ts>
|
#define debug 1 && std::cerr
|
||||||
void debug_print(const Ts&...) {}
|
|
||||||
#else
|
#else
|
||||||
template <typename... Ts>
|
#define debug 0 && std::cerr
|
||||||
void debug_print(const Ts&... v) {
|
|
||||||
((std::cerr << v), ...);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
inline void hit_any_key() {
|
||||||
|
#ifndef NDEBUG
|
||||||
|
debug << "Hit any key to continue..." << std::endl << std::flush;
|
||||||
|
system("read"); // on Windows, should be system("pause");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
typedef std::chrono::milliseconds::rep TimePoint; // A value in milliseconds
|
typedef std::chrono::milliseconds::rep TimePoint; // A value in milliseconds
|
||||||
static_assert(sizeof(TimePoint) == sizeof(int64_t), "TimePoint should be 64 bits");
|
static_assert(sizeof(TimePoint) == sizeof(int64_t), "TimePoint should be 64 bits");
|
||||||
inline TimePoint now() {
|
inline TimePoint now() {
|
||||||
|
|||||||
+353
-211
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user