Lawnmover.Pattern.GetCell C# (CSharp) Method

GetCell() public method

public GetCell ( int nrow, int ncol ) : int
nrow int
ncol int
return int
        public int GetCell(int nrow, int ncol)
        {
            return this.cells[nrow, ncol];
        }

Usage Example

Beispiel #1
0
        public void SetRowsUsingStrings()
        {
            Pattern pattern = new Pattern(2, 2);

            pattern.SetRow(0, "1 2");
            pattern.SetRow(1, "2 3");

            Assert.AreEqual(1, pattern.GetCell(0, 0));
            Assert.AreEqual(2, pattern.GetCell(0, 1));
            Assert.AreEqual(2, pattern.GetCell(1, 0));
            Assert.AreEqual(3, pattern.GetCell(1, 1));
        }
All Usage Examples Of Lawnmover.Pattern::GetCell