Example #1
0
        public void Build_field_size_of_one_by_one_and_zero_mine()
        {
            var fields = new MineFields();

            fields.Create(1, 1);

            Assert.That(fields.GetHint(0, 0), Is.EqualTo(0));
        }
Example #2
0
        public void Build_two_by_two_field_and_one_of_mine_toprightcorner(int xPos, int yPos, int expect)
        {
            var fields = new MineFields();

            fields.Create(2, 2);
            fields.Mine(1, 0);

            Assert.That(fields.GetHint(xPos, yPos), Is.EqualTo(expect));
        }
Example #3
0
        public void Build_three_by_three_field_and_two_of_mine(int xPos, int yPos, int expect)
        {
            var fields = new MineFields();

            fields.Create(3, 3);
            fields.Mine(0, 0);
            fields.Mine(1, 0);

            Assert.That(fields.GetHint(xPos, yPos), Is.EqualTo(expect));
        }