예제 #1
0
        public void RotateShape(Field field, RotationDirection direction)
        {
            var shadowShape = shapeService.CopyShape(field.ActiveShape);

            shapeService.Rotate(shadowShape, direction);

            if (fieldService.CanMoveShape(field, shadowShape))
            {
                shapeService.Rotate(field.ActiveShape, direction);
            }
        }
예제 #2
0
        public void CanMoveShape_WhenShapeHasNoBoxes_ReturnsTrue()
        {
            // Arrange
            var field = new Field();
            var shape = new Shape
            {
                Boxes = new List <Box>()
            };

            // Act
            var result = sut.CanMoveShape(field, shape);

            // Assert
            Assert.True(result);
        }