Exemplo n.º 1
0
        public void ReversL_Should_TripleTurn()
        {
            var lShape           = new ReverseLShapedPiece();
            var collisionMapList = lShape.DecomposeCollisionMapInLinesOfBlocks();

            lShape.Turn();
            lShape.Turn();
            lShape.Turn();
            var turnedCollisionMapList = lShape.DecomposeCollisionMapInLinesOfBlocks();
            var expected = collisionMapList[0][0];
            var actual   = turnedCollisionMapList.Last().First();

            Assert.AreEqual(expected, actual);
            var expected1 = collisionMapList[1][0];
            var actual1   = turnedCollisionMapList.Last()[1];

            Assert.AreEqual(expected1, actual1);
        }
Exemplo n.º 2
0
        public void ReverseLShaped_Should_Be_Four_Contiguous_Blocks()
        {
            var ReverseLShaped = new ReverseLShapedPiece();

            Assert.IsTrue(ReverseLShaped.IsFourContiguousBlocks);
        }