mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Better document how Position c'tor works
Renamed a bit the functions to be more clear what we actually are doing when we craete a Position object and explained how StateInfo works. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ namespace {
|
||||
// The root position. This is set up when the user (or in practice, the GUI)
|
||||
// sends the "position" UCI command. The root position is sent to the think()
|
||||
// function when the program receives the "go" command.
|
||||
Position RootPosition;
|
||||
Position RootPosition(StartPosition);
|
||||
|
||||
// Local functions
|
||||
bool handle_command(const string& command);
|
||||
@@ -210,7 +210,7 @@ namespace {
|
||||
}
|
||||
// Our StateInfo st is about going out of scope so copy
|
||||
// its content inside RootPosition before they disappear.
|
||||
RootPosition.saveState();
|
||||
RootPosition.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user