假设我有以下基类,Queen和Knight作为它的衍生物。 WeaponBehaviour是一个界面。我无法弄清楚如何使用Guice注入武器,具体取决于具体的GameCharacter类型。 public abstract class GameCharacter {
@Inject
protected WeaponBehaviour weapon;
public G
我使用国家Monad维护我的世界,并使用光泽图形。光泽在每个“打勾”之间传递一个“世界”对象以继续前进。问题是,对于这个工作,我需要能够定义: wsToPicture :: WorldState() -> Picture
其中 World = data World = World { ... }
WorldState = type WorldState = State World
Pict