Example #1
0
 public AbstractAnimal(String name)
 {
     this.name = name;
     this.progressTime = 0;
     this.status = AnimalStatus.Wait;
     this.seed = null;
 }
Example #2
0
 public void plant(SeedBed seed)
 {
     this.startWork(seed, this.plantTime());
 }
Example #3
0
 public void irrigate(SeedBed seed)
 {
     this.startWork(seed, this.irrigateTime());
 }
Example #4
0
 public void stomp(SeedBed seed)
 {
     this.startWork(seed, this.stompTime());
 }
Example #5
0
 public void dig(SeedBed seed)
 {
     this.startWork(seed, this.digTime());
 }
Example #6
0
 protected void startWork(SeedBed seed, int time)
 {
     this.progressTime = time;
     this.status = AnimalStatus.Work;
     this.seed = seed;
 }