Ejemplo n.º 1
0
 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));
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }