public class Unit { int hp; public Unit(){ hp = 0; } public void play(int tcnt){ System.out.println(tcnt+"½Ã°£ ¿îµ¿ÇÏ´Ù."); setHp(hp+tcnt); } void setHp(int value){ if(value<100){ hp = value; } else{ hp = 100; } } public int getHp(){ return hp; } }