public void GetHints_NoCharsInCorrPos_ResultReturned() { // Arrange int gameId = _gameAccessor.CreateGame(); List <string> game = _gameAccessor.GetGame(gameId); List <string> attempt = new List <string>(); attempt.Add(game[3]); attempt.Add(game[2]); attempt.Add(game[1]); attempt.Add(game[0]); string expectedHints = "WWWW"; // Act string hints = _gameAccessor.GetHints(game, attempt); // Assert Assert.Equal(expectedHints, hints); }
public string AttemptGame(string att) { string[] arString = att.Split('_'); int gameId = int.Parse(arString[0]); List <string> attempt = new List <string> { arString[1][0].ToString(), arString[1][1].ToString(), arString[1][2].ToString(), arString[1][3].ToString() }; _gameAccessor.RegisterAttempt(gameId, attempt); List <string> game = _gameAccessor.GetGame(gameId); return(_gameAccessor.GetHints(game, attempt)); }