public void Test_2x2_Two_Mines() { var field = new Field() { ColumnCount = 2, Rows = new FieldRows(new[] { "**", "22" }) }; var populator = new HintsPopulator(field); Assert.That(populator.GetHints().Rows, Is.EquivalentTo(new[] { "**", "22" })); }
public void Test_1x1() { var field = new Field() { ColumnCount = 1, Rows = new FieldRows(new [] { "*" }) }; var populator = new HintsPopulator(field); Assert.That(populator.GetHints().Rows, Is.EquivalentTo(new[] { "*" })); }
public void Test1() { var field = new Field {ColumnCount = 2, Rows = new FieldRows(new[] {"**", "**"})}; Assert.That(field.MineAt(0, 0), Is.True); Assert.That(field.MineAt(0, 1), Is.True); Assert.That(field.MineAt(1, 1), Is.True); Assert.That(field.MineAt(1, 0), Is.True); Assert.That(field.MineAt(0, 2), Is.False); Assert.That(field.MineAt(2, 0), Is.False); }
public HintsPopulator(Field field) { this.field = field; }