public Game(Action<string> writeLine, string[] players) { _players = new Players(); CreatePlayers(players); _gameEngine = new GameEngine(_players, new GamePrinter(writeLine)); _gamePrinter = new GamePrinter(writeLine); _gamePrinter.PrintoutPlayers(players); }
public void Init() { _gamePrinter = new GamePrinter(_console.WriteLine); _mockedPlayer = Substitute.For<IPlayer>(); _players = Substitute.For<IPlayers>(); _gameEngine = new GameEngine(_players, _gamePrinter); _playerA = new Player("ana", _defaultLocation, _defaultNumberOfCoins); _playerB = new Player("bob", _defaultLocation, _defaultNumberOfCoins); }
public GameEngine(IPlayers players, GamePrinter gamePrinter) { _players = players; _gamePrinter = gamePrinter; _currentPlayer = players.GetNextPlayer(); }