コード例 #1
0
        public void DropProxyTest()
        {
            ShapeProxy b = createInstance();

            bool bottomLineFilled = false;

            //to avoid clearlines if ShapeI spawns
            boardInstance.board[19, 0] = Color.Transparent;

            //two places down
            Console.WriteLine("Board before drop\n");
            UtilityClass.DrawFakeBoardContents(boardInstance);
            //move down once
            //act
            b.Drop();

            String afterDrop = b.ToString();

            Console.WriteLine("board After drop\n");


            UtilityClass.DrawFakeBoardContents(boardInstance);

            if (boardInstance[19, 3] != Color.Transparent ||
                boardInstance[19, 4] != Color.Transparent ||
                boardInstance[19, 5] != Color.Transparent ||
                boardInstance[19, 6] != Color.Transparent)
            {
                bottomLineFilled = true;
            }
            else
            {
                bottomLineFilled = false;
            }

            Assert.AreEqual(true, bottomLineFilled);
        }