コード例 #1
0
    public bool[,] mapInit(bool[,] map)
    {
        for (int x = 0; x < width; x++)
        {
            for (int y = 0; y < height; y++)
            {
                //float r = Random.Range(0f, 100f);
                int r = rand.getRandom();
                //Debug.Log(r);
                map[x, y] = (r < aliveChance);
            }
        }

        return(map);
    }