protected override string SolvePartOne() { game = new CupGame(Input); for (int i = 0; i < 100; i++) { game.playRound(); } return(game.ToString()); }
public void Part1Test() { // Given var game = new CupGame("389125467".Select(c => int.Parse(c.ToString())).ToList()); Assert.Equal("389125467", game.ToString(3)); game.Move(); Assert.Equal("328915467", game.ToString(3)); game.Move(); Assert.Equal("325467891", game.ToString(3)); game.Move(); Assert.Equal("725891346", game.ToString(7)); game.Move(); Assert.Equal("325846791", game.ToString(3)); game.Move(); Assert.Equal("925841367", game.ToString(9)); game.Move(); Assert.Equal("725841936", game.ToString(7)); game.Move(); Assert.Equal("836741925", game.ToString(8)); game.Move(); Assert.Equal("741583926", game.ToString(7)); game.Move(); Assert.Equal("574183926", game.ToString(5)); game.Move(); Assert.Equal("583741926", game.ToString(5)); }