Chess.Data.Entities.ChessPiece.SetupNewMove C# (CSharp) Method

SetupNewMove() protected method

protected SetupNewMove ( int row, int column ) : Move
row int
column int
return Move
        protected Move SetupNewMove(int row, int column)
        {
            if (!CurrentColumn.HasValue || !CurrentRow.HasValue)
                throw new Exception("A move can not be setup, this piece is missing a row or column.");

            return new Move()
            {
                EndRow = row,
                EndColumn = column,
                StartRow = CurrentRow.Value,
                StartColumn = CurrentColumn.Value
            };
        }