示例#1
0
        public static void SetMessage(CGamer gamer, string protocol, string msg)
        {
            string book = protocol == "Book" ? "book " : "";
            Color  col  = gamer.isWhite ? Color.DimGray : Color.Black;

            AppendTimeText($"{book}{gamer.player.name}", col);
            AppendText($" > {msg}\n", Color.DarkBlue);
        }
示例#2
0
        public void Rotate(int index = 0)
        {
            CGamer p = gamer[0];

            gamer[0] = gamer[1];
            gamer[1] = p;
            Init(index);
        }
示例#3
0
 public static void WriteHeader(CGamer gw, CGamer gb)
 {
     if (!locked)
     {
         This.richTextBox1.Clear();
         timer.Restart();
         AppendTimeText($"Start {DateTime.Now:yyyy-MM-dd HH:mm}\n", Color.Olive);
         WriteHeaderGamer(gw);
         WriteHeaderGamer(gb);
     }
 }
示例#4
0
 void XbGo()
 {
     if (player.modeValue.mode == "Standard")
     {
         CGamer gc = CGamerList.This.GamerCur();
         CGamer gs = CGamerList.This.GamerSec();
         SendMessageToEngine($"time {gc.GetIntTime() / 10}");
         SendMessageToEngine($"otim {gs.GetIntTime() / 10}");
     }
     SendMessageToEngine(CHistory.LastUmo());
 }
示例#5
0
        public void Next()
        {
            CGamer cg = GamerCur();

            cg.timer.Stop();
            cg.isBookStarted = false;
            cg.isBookFail    = false;
            cg.isEngRunning  = false;
            curIndex        ^= 1;
            cg = GamerCur();
            if (cg.player.IsRealHuman())
            {
                cg.TimerStart();
            }
        }
示例#6
0
 void UciGo()
 {
     SendMessageToEngine(CHistory.GetPosition());
     if (player.modeValue.mode == "Standard")
     {
         CGamer gw = CGamerList.This.GamerWhite();
         CGamer gb = CGamerList.This.GamerBlack();
         SendMessageToEngine($"go wtime {gw.GetIntTime()} btime {gb.GetIntTime()} winc 0 binc 0");
     }
     else
     {
         SendMessageToEngine($"go {player.modeValue.GetUci()} {player.modeValue.GetUciValue()}");
     }
     TimerStart();
 }
示例#7
0
        public static void WriteHeaderGamer(CGamer g)
        {
            Color  color  = g.isWhite ? Color.DimGray : Color.Black;
            string colorS = g.isWhite ? "White" : "Black";

            AppendTimeText($"{colorS}: {g.player.GetName()}\n", color);
            if (g.engine == null)
            {
                return;
            }
            AppendTimeText($"Engine: {g.player.engine}\n", color);
            AppendTimeText($"File: {g.engine.file}\n", color);
            string parameters = g.engine.parameters;

            if (parameters != "")
            {
                AppendTimeText($"Parameters: {g.engine.parameters}\n", color);
            }
        }
示例#8
0
 public CGamerList()
 {
     This     = this;
     gamer[0] = new CGamer();
     gamer[1] = new CGamer();
 }