SimulateWinter - AS 2017

From TRCCompSci - AQA Computer Science
Revision as of 09:36, 3 March 2017 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Code

static void SimulateWinter(char[,] Field)
{
    for (int Row = 0; Row < FIELDLENGTH; Row++)
    {
        for (int Column = 0; Column < FIELDWIDTH; Column++)
        {
            if (Field[Row, Column] == PLANT)
            {
                Field[Row, Column] = SOIL;
            }
        }
    }
}

Explanation