package ch.fusun.baron.unit.ui;
import ch.fusun.baron.map.ui.gef.editpart.TileChild;
import ch.fusun.baron.player.Dynasty;
import ch.fusun.baron.swt.isometry.components.Sprite;
/**
* The flag for a unit
*/
public class UnitDynastyTileChild implements TileChild<Dynasty> {
private final Dynasty dynasty;
/**
* @param dynasty
* coat of arms
*/
public UnitDynastyTileChild(Dynasty dynasty) {
this.dynasty = dynasty;
}
@Override
public Dynasty getModel() {
return dynasty;
}
@Override
public Sprite getSprite() {
return new Sprite(Activator.getImageForDynasty(dynasty), null, 31);
}
}