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); }
public void Rotate(int index = 0) { CGamer p = gamer[0]; gamer[0] = gamer[1]; gamer[1] = p; Init(index); }
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); } }
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()); }
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(); } }
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(); }
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); } }
public CGamerList() { This = this; gamer[0] = new CGamer(); gamer[1] = new CGamer(); }