Esempio n. 1
0
        private void NewGame()
        {
            BoardItems = Chess.BoardSetup();
            if (moves.Length > 0)
            {
                moves.Clear();
            }
            if (CheckMate)
            {
                CheckMate = false;
            }
            if (IsEngineThinking)
            {
                IsEngineThinking = false;
            }
            ResetSomeMembers();
            engine.SendCommand(UciCommands.ucinewgame);

            if (PlayerColor == PieceColor.Black)
            {
                engine.SendCommand(UciCommands.position);
                engine.SendCommand(UciCommands.go_movetime + " " + deepAnalysisTime.ToString());
                IsEngineThinking = true;
            }
        }