SeedLands - AS 2017

From TRCCompSci - AQA Computer Science
Revision as of 09:30, 3 March 2017 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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