public void MovePiece(ChessPiece piece, string algebraicPosition) { byte rowIndex = ChessPGN.UNKNOWN_INDEX; byte colIndex = ChessPGN.UNKNOWN_INDEX; ChessPGN.AlgebraicPositionToIndexes(algebraicPosition, ref rowIndex, ref colIndex); MovePiece(piece, rowIndex, colIndex); }
/// <summary> /// When we Refers to cells by an algebraic position, the indexes are 1-based /// </summary> /// <param name="algebraicPosition"></param> /// <returns></returns> public ChessBoardCell this[string algebraicPosition] { get { byte row = 0; byte column = 0; ChessPGN.AlgebraicPositionToIndexes(algebraicPosition, ref row, ref column); if (row != ChessPGN.UNKNOWN_INDEX && column != ChessPGN.UNKNOWN_INDEX) { return(boardCells[row, column]); } else { return(null); } } }