Stop function waits for bestmove