Changed package naming across all examples.

This commit is contained in:
Ilkka Seppala
2015-05-31 11:55:18 +03:00
parent 703ebd3e20
commit 8524c75ba6
437 changed files with 1095 additions and 1402 deletions

View File

@ -0,0 +1,45 @@
package com.iluwatar.modelviewcontroller;
/**
*
* GiantController can update the giant data and redraw it using the view.
*
*/
public class GiantController {
private GiantModel giant;
private GiantView view;
public GiantController(GiantModel giant, GiantView view) {
this.giant = giant;
this.view = view;
}
public Health getHealth() {
return giant.getHealth();
}
public void setHealth(Health health) {
this.giant.setHealth(health);
}
public Fatigue getFatigue() {
return giant.getFatigue();
}
public void setFatigue(Fatigue fatigue) {
this.giant.setFatigue(fatigue);
}
public Nourishment getNourishment() {
return giant.getNourishment();
}
public void setNourishment(Nourishment nourishment) {
this.giant.setNourishment(nourishment);
}
public void updateView() {
this.view.displayGiant(giant);
}
}