public DBoard(int _size) { size = _size; blackStones = new BitBoardG(size); whiteStones = new BitBoardG(size); blackEst = new BitBoardG(size); whiteEst = new BitBoardG(size); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.UseShellExecute = false; startInfo.RedirectStandardInput = true; startInfo.RedirectStandardOutput = true; startInfo.CreateNoWindow = true; //startInfo.WindowStyle = ProcessWindowStyle.Hidden; if (size == 19) { startInfo.FileName = @"..\..\..\x64\Release\ConsoleDriver.exe"; } else if (size == 9) { startInfo.FileName = @"..\..\..\x64\Release\ConsoleDriver9.exe"; } engine = new Process(); engine.StartInfo = startInfo; engine.Start(); }
private void DrawStone(Graphics G, BitBoardG bits, Bitmap map) { foreach (var stone in bits.GetPositions()) { var gpos = GetDrawCoord(stone); G.DrawImage(map, (float)(gpos.Item1 - 0.5), (float)(gpos.Item2 - 0.5)); } }
private void MarkStonePosition(Graphics G, BitBoardG bits, Color fillColor, Color edgeColor) { foreach (var stone in bits.GetPositions()) { int x0 = Constants.CellSize * (stone.Item1 + 1); int y0 = Constants.CellSize * (stone.Item2 + 1); SolidBrush brush = new SolidBrush(fillColor); Pen edgePen = new Pen(edgeColor, 1); G.FillRectangle(brush, x0 - 4, y0 - 4, 8, 8); G.DrawRectangle(edgePen, x0 - 4, y0 - 4, 8, 8); } }