public class Environment {

//  基本的get/set方法
    public int getTemperature() {
        return temperature;
    }

    public void setTemperature(int temperature) {
        if(temperature>=-60&&temperature<=100)this.temperature = temperature;
    }

    public int getHumidity() {
        return humidity;
    }

    public void setHumidity(int humidity) {
       if(humidity>=0&&humidity<=100) this.humidity = humidity;
    }

    public int getTerrain() {
        return terrain;
    }

    public void setTerrain(int terrain) {
        if(terrain>=1 && terrain<=3)this.terrain = terrain;
    }

    public int getOxygenLevel() {
        return oxygenLevel;
    }

    public void setOxygenLevel(int oxygenLevel) {
        if(oxygenLevel>=0 && oxygenLevel<=40)this.oxygenLevel = oxygenLevel;
    }

    public int getFood() {
        return food;
    }

    public void setFood(int food) {
        if(food>=1&&food<=8)this.food = food;
    }
//  get/set结束

//变量定义
    int temperature;
    int humidity;
    int terrain; // 1- water, 2-land, 3-water&land
    int oxygenLevel;
    int food;//[to be finish]

    Environment(int temperature, int humidity, int terrain, int oxygenLevel, int food){//初始化环境（有参数）
        this.temperature = temperature;
        this.humidity = humidity;
        this.terrain = terrain;
        this. oxygenLevel = oxygenLevel;
        this.food = food;
    }
    Environment(){//初始化环境（默认）
        this.temperature = 3;//20
        this.humidity = 2;//40
        this.terrain = 2;
        this. oxygenLevel = 3;//20
        this.food = 8;
    }
}

@@ -1311,33 +1311,32 @@
 n;%0A        this.
- 
 oxygenLevel = ox
@@ -1512,17 +1512,16 @@
    this.
- 
 oxygenLe

Update Environment.java