Exemple #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));
        }
Exemple #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));
        }
Exemple #3
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));
        }