Ejemplo n.º 1
0
        public void Execute(string[] input, IKingdomRepository repository)
        {
            var commandName = input[0];

            if (commandName == "Kill")
            {
                var guardName = input[1];
                repository.TryRemoveGuard(guardName);
            }

            if (commandName == "Attack")
            {
                repository.King.GetAttacked();
            }
        }
Ejemplo n.º 2
0
 public Engine(IKingdomRepository repo)
 {
     this.repository = repo;
     this.executor   = new CommandExecutor();
 }
Ejemplo n.º 3
0
 public Engine()
 {
     this.repository = new KingdomRepository();
 }