Hopefully fix crashing issues
This commit is contained in:
parent
da5eac94d6
commit
faf64c22e1
|
@ -65,6 +65,9 @@ type
|
|||
mailbox*: array[Square(0)..Square(63), Piece]
|
||||
|
||||
|
||||
proc toFEN*(self: Position): string
|
||||
|
||||
|
||||
func inCheck*(self: Position): bool {.inline.} =
|
||||
## Returns if the current side to move is in check
|
||||
return self.checkers != 0
|
||||
|
|
|
@ -357,8 +357,9 @@ proc startUCISession* =
|
|||
of NewGame:
|
||||
session.board = newDefaultChessboard()
|
||||
of Go:
|
||||
var thread: Thread[tuple[session: UCISession, command: UCICommand]]
|
||||
createThread(thread, bestMove, (session, cmd))
|
||||
var thread = new Thread[tuple[session: UCISession, command: UCICommand]]
|
||||
createThread(thread[], bestMove, (session, cmd))
|
||||
GcRef(thread)
|
||||
of Stop:
|
||||
session.currentSearch.load().stop()
|
||||
of SetOption:
|
||||
|
|
Loading…
Reference in New Issue