summaryrefslogtreecommitdiff
path: root/chess-engine.el
diff options
context:
space:
mode:
Diffstat (limited to 'chess-engine.el')
-rw-r--r--chess-engine.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/chess-engine.el b/chess-engine.el
index b097fe3..f90c504 100644
--- a/chess-engine.el
+++ b/chess-engine.el
@@ -120,7 +120,9 @@
(format "Do you wish to play a chess game against an anonymous opponent? ")))
(progn
(let ((chess-engine-handling-event t))
- (chess-game-set-data game 'active t))
+ (unless game
+ (setq game (chess-engine-set-game nil (chess-game-create))))
+ (chess-engine-set-start-position nil))
(chess-engine-command nil 'accept))
(chess-engine-command nil 'decline)))
t)