public void ItIteratesOverPlayersToFindAWinner() { //Given string userInput = "1 2\nG T\n2\n1 0 1\n2 0 0"; //When Maze maze = new Maze(); Players players = new Players(); string winner = new GoldHuntGame(maze, players).InitWith(userInput).Start(); //Then Assert.AreEqual("2", winner); }
public void ItCreatesGameWithBoardAndPlayers() { //Given const string mazeInputString = "2 3\nD 2 0 D -1 0 T\nG D 6 0 D 0 3"; const string playersInputString = "2\n1 4 2\n2 2 0"; const string gameInput = mazeInputString + "\n" + playersInputString; //When GoldHuntGame game = new GoldHuntGame(stubMaze, stubPlayers).InitWith(gameInput); //Then List<string> mazeInputList = mazeInputString.Split('\n').ToList(); List<string> playerInputList = playersInputString.Split('\n').ToList(); stubMaze.AssertWasCalled(maze => maze.InitWith(mazeInputList)); stubPlayers.AssertWasCalled(players => players.InitWith(playerInputList)); }