Beispiel #1
0
        public void build_field_size_of_one_by_one_and_zero_mine()
        {
            MineFields fields = new MineFields();

            fields.Create(1, 1);

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

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

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

            fields.create(1, 1);
            fields.mine(0, 0);

            Assert.That(fields.getHint(0, 0), Is.EqualTo(-1));
        }
Beispiel #4
0
        public void build_two_by_two_field_and_one_of_mine_toprightcorner(int xPos, int yPos, int expect)
        {
            MineFields fields = new MineFields();

            fields.create(2, 2);
            fields.mine(1, 0);

            Assert.That(fields.getHint(xPos, yPos), Is.EqualTo(expect));
        }
Beispiel #5
0
        public void build_three_by_three_field_and_two_of_mine(int xPos, int yPos, int expect)
        {
            MineFields fields = new MineFields();

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

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