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(); } }
public Engine(IKingdomRepository repo) { this.repository = repo; this.executor = new CommandExecutor(); }
public Engine() { this.repository = new KingdomRepository(); }