public void Test_ScoreBoard_AddScore() { var scoreBoard = new ScoreBoard(); scoreBoard.AddScore("test", 10); var actual = scoreBoard.TopScores.First(); var expected = new KeyValuePair<string, int>("test", 10); Assert.AreEqual<KeyValuePair<string, int>>(expected, actual); }
/// <summary> /// Initializes a new instance of the <see cref="Minesweeper.Game.MinesweeperGame"/> class. /// </summary> /// <param name="uiManager">The <see cref="Minesweeper.Game.IUIManager"/> implementation used to read and write.</param> public MinesweeperGame(IUIManager uiManager) { this.minefieldRows = 5; this.minefieldCols = 10; this.uiManager = uiManager; this.prompt = Messages.EnterRowCol; this.scoreBoard = new ScoreBoard(); // Show game this.uiManager.DisplayIntro(Messages.Intro); this.uiManager.DrawTable(this.minefieldRows, this.minefieldCols); this.GenerateMinefield(); }