예제 #1
0
        public void TurnOneTime(int start, FakeShape expected)
        {
            var shape = new TetriminoS(start);

            shape.Turn();
            Check.That(shape).IsEquivalentTo(expected);
        }
예제 #2
0
        public void TurnTwoTime()
        {
            var shape = new TetriminoS();

            for (var i = 0; i < 4; i++)
            {
                shape.Turn();
            }
            Check.That(shape).IsEquivalentTo((1, 3), (1, 2), (2, 2), (2, 1));
        }
예제 #3
0
        public void MoveLeft(int actionCount, int col1, int col2, int col3, int col4)
        {
            var shape = new TetriminoS(7);

            for (var i = 0; i < actionCount; i++)
            {
                shape.MoveLeft();
            }
            Check.That(shape).IsEquivalentTo((1, col1), (1, col2), (2, col3), (2, col4));
        }
예제 #4
0
        public void TurnCorrectlyWhenReachedRightSideInVerticalPosition()
        {
            var shape = new TetriminoS(9);

            shape.Turn();
            for (var i = 0; i < 5; i++)
            {
                shape.MoveRight();
            }
            shape.Turn();
            Check.That(shape).IsEquivalentTo((1, 12), (1, 11), (2, 11), (2, 10));
        }
예제 #5
0
        public void BeInitialized()
        {
            var shape = new TetriminoS();

            Check.That(shape).IsEquivalentTo((1, 3), (1, 2), (2, 2), (2, 1));
        }