예제 #1
0
        private void GetingOutSideItem()
        {
            IBoard <IItem, int> board = new BasicBoard(360);

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

            board.Put(item, point);
            board.Get(new BasicPoint(360), new BasicWeapon());
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #4
0
        public void GetItemInsideRange()
        {
            IBoard <IItem, int> board = new BasicBoard();

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

            board.Put(item, point);

            Assert.AreSame(item, board.Get(new BasicPoint(2), new BasicWeapon()));
        }
예제 #5
0
        public void GetItemAtSamePosition()
        {
            IBoard <IItem, int> board = new BasicBoard();

            IItem        item  = new BasicEnemy(5);
            IPoint <int> point = new BasicPoint(1);

            board.Put(item, point);

            Assert.AreSame(item, board.Get(point, new BasicWeapon()));
        }