본문 바로가기

내그림/ㅅㄷㄴㅅ

자바 uml 테스터



unit marine1 = new marine();

location some= new location();
som.setisland(true);
location ddang = new location();
ddang.setisland(false);

unit target1 = new vessel();
unit target2 = new vulture();

marine1.perfomattack(target1);
marine1.perfommove(ddang);
maring1.performmove(some);

wraith1.perfomattack(target1);
wraith1.perfommove(some);

tank1.perfomrattack(target1);
tank1.perfomattack(target2);
tank1.perfommove(ddang);




어텍비헤이비어 클래스
public abstarct class AttackBehavior {

protected int groundAttack;
protected int airAttack;
protected int range;

public abstract void attack(Unit target);
}




uml 만드는데서

attribute = get set 안쓰고 변수 사용
property = get set 써서 값을 고칠 수 있다



======

이거랑 GUI 합치기

======
gui의 시뮬레이터에 액션만 넣으면 된다...

'내그림 > ㅅㄷㄴㅅ' 카테고리의 다른 글

  (0) 2008.06.27
우훔  (0) 2008.04.04
ddd  (0) 2008.03.20
fifo  (0) 2008.03.19