SeedLands - AS 2017

From TRCCompSci - AQA Computer Science
Jump to: navigation, search

The Code

static void SeedLands(char[,] Field, int Row, int Column)
{
    if (Row >= 0 && Row < FIELDLENGTH && Column >= 0 && Column < FIELDWIDTH)
    {
        if (Field[Row, Column] == SOIL)
        {
            Field[Row, Column] = SEED;
        }
    }
}

Explanation