コード例 #1
0
 public Ecosystem( EcosystemType type, Fauna fauna, Flora flora )
 {
     _isHealthy = true;
     _healthRating = 100;
     _type = type;
     _fauna = fauna;
     _flora = flora;
 }
コード例 #2
0
        public Ecosystem Generate(EcosystemType type, int xDimension, int yDimension)
        {
            switch (type)
            {
            case EcosystemType.Random:
                return(new RandomEcosystem(xDimension, yDimension));

            case EcosystemType.UmbrellaCorp:
                return(new UmbrellaCorpEcosystem(xDimension, yDimension));

            default:
                return(new CitadinEcosystem(xDimension, yDimension));
            }
        }