public void ItGeneratesPlayersWithUserInput() { //Given var playersInput = new List<string> { "2", "1 4 2", "2 2 0" }; //When var players = new Players().InitWith(playersInput).PlayersMap; //Then Assert.AreEqual(2, players.Count); Assert.AreEqual(new Tuple<int, int>(4, 2), players["1"]); Assert.AreEqual(new Tuple<int, int>(2, 0), players["2"]); }
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 GoldHuntGame(Maze maze, Players players) { Maze = maze; Players = players; }
public void Setup() { stubMaze = MockRepository.GenerateStub<Maze>(); stubPlayers = MockRepository.GenerateStub<Players>(); }