Exemplo n.º 1
0
    void Awake()
    {
        _instance = this;
        Rules     = new Classic();

        //States = new int[(int)CellCount.x, (int)CellCount.y];
        //lastProcessedStates = new int[(int)CellCount.x, (int)CellCount.y];

        for (int i = 0; i < CellCount.x; i++)
        {
            for (int j = 0; j < CellCount.y; j++)
            {
                int s = Rules.getRandomCell();
                States.Add(new Vector2(i, j), s);
                lastProcessedStates.Add(new Vector2(i, j), s);
                //States[i, j] = s;
                //lastProcessedStates[i, j] = s;
            }
        }

        incrementCurrentGeneration();
    }