public void CellCastling(Position pos) { Button btn = buttons[pos.GetX0(), pos.GetY0()]; btn.FlatAppearance.BorderSize = 2; btn.FlatAppearance.BorderColor = Color.Yellow; }
public void CellMove(Position pos) { Button btn = buttons[pos.GetX0(), pos.GetY0()]; btn.FlatAppearance.BorderSize = 2; btn.FlatAppearance.BorderColor = Color.Green; }
public void CellDefault(Position pos) { Button btn = buttons[pos.GetX0(), pos.GetY0()]; btn.FlatAppearance.BorderSize = 0; btn.FlatAppearance.BorderColor = Color.White; }
public void CellAttack(Position pos) { Button btn = buttons[pos.GetX0(), pos.GetY0()]; btn.FlatAppearance.BorderSize = 2; btn.FlatAppearance.BorderColor = Color.Red; }
/// <summary> /// Установить фигуру позиции pos /// </summary> /// <param name="pos"></param> /// <param name="fig"></param> private void SetFigureAt(Position pos, Figure fig) { try { field[pos.GetX0(), pos.GetY0()] = fig; } catch { return; } }