Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- handleCommand (Go (BestMove _)) = do
- g <- get
- mv <- lift newEmptyMVar
- tid <- lift $ forkIO $ do
- putMVar mv $ search g 1
- mapM_ (swapMVar mv . search g) [2..]
- lift $ threadDelay 2000000
- lift $ putStrLn "killing"
- lift $ killThread tid
- move <- lift $ takeMVar mv
- lift $ putStr "bestmove "
- lift $ pp move
- lift $ putStrLn ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement