protected virtual void SetByPosition(int dot, char value) { int x; int y; Position.CalculateXY(dot, out x, out y); this.Rows[y - 1][x - 1] = value; }
protected virtual char GetByPosition(int dot) { int x; int y; Position.CalculateXY(dot, out x, out y); return(this.Rows[y - 1][x - 1]); }
/// <summary> /// 根据指定的相应的FEN的点获取相应的棋盘位置 /// </summary> /// <param name="dot"></param> /// <returns></returns> public static Position GetPositionByDot(int dot) { if (dot < 1 || dot > 64) { return(Empty); } int x; int y; Position.CalculateXY(dot, out x, out y); return(new Position(x, y)); }