Beispiel #1
0
 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));
 }
Beispiel #2
0
 public void Fight(string action, IBattleStrategy battleStrategy)
 {
     battleStrategy.Engage();
     Console.WriteLine(action);
     battleStrategy.Disenage();
 }
Beispiel #3
0
 public Ahmed()
 {
     _battleStrategy = new BattleStrategy <Ahmed>(this);
 }