// Usually, the Context allows replacing a Strategy object at runtime. public void SetStrategy(IFighterStrategy strategy) { _fighterStrategy = strategy; }
// Usually, the Context accepts a strategy through the constructor, but // also provides a setter to change it at runtime. public FighterContext(IFighterStrategy strategy) { _fighterStrategy = strategy; }