示例#1
0
        public void GetFreeAreaLessOneItem()
        {
            IBoard <IItem, int> board = new BasicBoard(4);

            IItem        item  = new BasicEnemy(range: 2);
            IPoint <int> point = new BasicPoint(1);

            board.Put(item, point);

            Assert.AreEqual(1, board.FreePointsTo(item).Length);
        }
示例#2
0
        public void MustBeAFullBoard()
        {
            IBoard <IItem, int> board = new BasicBoard(4);

            IItem        item  = new BasicEnemy(range: 4);
            IPoint <int> point = new BasicPoint(1);

            board.Put(item, point);

            Assert.AreEqual(0, board.FreePointsTo(item).Length);
        }
示例#3
0
        public void GetAllFreeArea()
        {
            IBoard <IItem, int> board = new BasicBoard(4);

            Assert.AreEqual(4, board.FreePointsTo(new BasicEnemy(range: 0)).Length);
        }