public Game(GameState state, IUserTopic topic, IBattleStrategy battleStrategy) { _state = state ?? throw new ArgumentNullException(nameof(state)); _hub = new Hub(_state.Hub, topic); _map = new Map(_state.Map); _topic = topic ?? throw new ArgumentNullException(nameof(topic)); _battleStrategy = battleStrategy ?? throw new ArgumentNullException(nameof(battleStrategy)); }
public void Fight(string action, IBattleStrategy battleStrategy) { battleStrategy.Engage(); Console.WriteLine(action); battleStrategy.Disenage(); }
public Ahmed() { _battleStrategy = new BattleStrategy <Ahmed>(this); }