public List <Player> CreateGame() { if (gameStatuEnum == GameStatuEnum.Played) { playerRepository.CreateCasinoPlayer(); playerRepository.AddNewPlayer(); gameStatuEnum = GameStatuEnum.IsPlayed; DealingCards(); } return(playerRepository.GetPlayers()); }
public void StartGame(List <string> playerNames) { int _playerAmount = playerNames.Count; for (int player = 0; player < _playerAmount; player++) { _playerRepository.AddNewPlayer(playerNames[player]); } }
public void CanCreatePlayer() { _playerRepository = new PlayerRepository(); _playerRepository.AddNewPlayer("Pelle"); List <Player> _players = _playerRepository.GetPlayers(); Assert.AreEqual(_players[0].Name, "Pelle"); }
public Player Post([FromBody] Player player) { player = _repository.AddNewPlayer(player); return(player); }