コード例 #1
0
        public void TurnOneTime(int start, FakeShape expected)
        {
            var shape = new TetriminoZ(start);

            shape.Turn();
            Check.That(shape).IsEquivalentTo(expected);
        }
コード例 #2
0
        public void TurnTwoTime()
        {
            var shape = new TetriminoZ();

            for (var i = 0; i < 4; i++)
            {
                shape.Turn();
            }
            Check.That(shape).IsEquivalentTo((1, 1), (1, 2), (2, 2), (2, 3));
        }
コード例 #3
0
        public void MoveLeft(int actionCount, int col1, int col2, int col3, int col4)
        {
            var shape = new TetriminoZ(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 TetriminoZ(9);

            shape.Turn();
            for (var i = 0; i < 5; i++)
            {
                shape.MoveRight();
            }
            shape.Turn();
            Check.That(shape).IsEquivalentTo((1, 10), (1, 11), (2, 11), (2, 12));
        }
コード例 #5
0
        public void TurnCorrectlyWhenReachedLeftSideInVerticalPosition()
        {
            var shape = new TetriminoZ();

            shape.Turn();
            for (var i = 0; i < 3; i++)
            {
                shape.MoveLeft();
            }
            shape.Turn();
            Check.That(shape).IsEquivalentTo((1, 1), (1, 2), (2, 2), (2, 3));
        }
コード例 #6
0
        public void BeInitialized()
        {
            var shape = new TetriminoZ();

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