mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
LibChess: Add optional ponder move to the BestMove command
The BestMove command can now include an optional ponder token, with the move that the engine would like to ponder on.
This commit is contained in:
parent
c885df98da
commit
25778d07e9
2 changed files with 17 additions and 3 deletions
|
@ -229,9 +229,10 @@ public:
|
|||
|
||||
class BestMoveCommand : public Command {
|
||||
public:
|
||||
explicit BestMoveCommand(Chess::Move move)
|
||||
explicit BestMoveCommand(Chess::Move move, Optional<Chess::Move> move_to_ponder = {})
|
||||
: Command(Command::Type::BestMove)
|
||||
, m_move(::move(move))
|
||||
, m_move_to_ponder(::move(move_to_ponder))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -240,9 +241,11 @@ public:
|
|||
virtual ErrorOr<String> to_string() const override;
|
||||
|
||||
Chess::Move move() const { return m_move; }
|
||||
Optional<Chess::Move> move_to_ponder() const { return m_move_to_ponder; }
|
||||
|
||||
private:
|
||||
Chess::Move m_move;
|
||||
Optional<Chess::Move> m_move_to_ponder;
|
||||
};
|
||||
|
||||
class InfoCommand : public Command {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue