public ManagerController(PlayerRepository playerRepository, CardRepository cardRepository, CardFactory cardFactory, PlayerFactory playerFactory) { this.playerRepository = playerRepository; this.cardRepository = cardRepository; this.playerFactory = playerFactory; this.cardFactory = cardFactory; }
public ManagerController() { this.playerFactory = new PlayerFactory(); this.cardFactory = new CardFactory(); this.playerRepository = new PlayerRepository(); this.cardRepository = new CardRepository(); this.battleField = new BattleField(); }
public ManagerController() { playerRepository = new PlayerRepository(); cardRepository = new CardRepository(); playerFactory = new PlayerFactory(); cardFactory = new CardFactory(); battleField = new BattleField(); }
public string AddPlayer(string type, string username) { IPlayer player = new PlayerFactory().CreatePlayer(type, username); this.playerRepository.Add(player); return($"Successfully added player of type {type} with username: {username}"); }
public ManagerController() { this.playerFactory = new PlayerFactory(); this.CardFactory = new CardFactory(); this.playerRepository = new PlayerRepository(); this.cardRepository = new CardRepository(); }
public string AddPlayer(string type, string username) { PlayerFactory factory = new PlayerFactory(); IPlayer newPlayer = factory.CreatePlayer(type, username); this.playerRepository.Add(newPlayer); return(string. Format(ConstantMessages. SuccessfullyAddedPlayer, type, username)); }