diff options
author | Brendan Coles <bcoles@gmail.com> | 2020-12-17 03:01:58 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-17 19:45:05 +0100 |
commit | 172707a94585b739cfeef4aefdddb475ed2ba6d9 (patch) | |
tree | 2f589afcf9e3a4714828da32eb869f902e127c0c /Games/Chess/ChessWidget.h | |
parent | 07badd953037b49ac754a644c59ae9531754fce1 (diff) | |
download | serenity-172707a94585b739cfeef4aefdddb475ed2ba6d9.zip |
Chess: Prevent board changes when waiting for ChessEngine to move
Diffstat (limited to 'Games/Chess/ChessWidget.h')
-rw-r--r-- | Games/Chess/ChessWidget.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Games/Chess/ChessWidget.h b/Games/Chess/ChessWidget.h index 493c93d25b..906bdbb7e9 100644 --- a/Games/Chess/ChessWidget.h +++ b/Games/Chess/ChessWidget.h @@ -70,7 +70,7 @@ public: bool import_pgn(const StringView& import_path); bool export_pgn(const StringView& export_path) const; - void resign(); + int resign(); void flip_board(); void reset(); @@ -95,7 +95,8 @@ public: void set_engine(RefPtr<Engine> engine) { m_engine = engine; } - void maybe_input_engine_move(); + void input_engine_move(); + bool want_engine_move(); void set_coordinates(bool coordinates) { m_coordinates = coordinates; } bool coordinates() const { return m_coordinates; } |