Beispiel #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.

            var squareMaker     = UIViewBuilder.InitialiseUIComponents(view: View);
            var shapeSetBuilder = new ShapeSetBuilder(squareViewFactory: squareMaker);

            _shapeController = new GameInitialiser()
                               .MakeShapeController(shapeSetBuilder: shapeSetBuilder);
        }
Beispiel #2
0
        public void TestOccupiedGridSquareMatrixIsCorrectSize()
        {
            // Arrange
            var shapeSetBuilder = new ShapeSetBuilder(squareViewFactory: new MockSquareFactory());

            // Act
            var gridSquares = shapeSetBuilder.MakeGridSquares();

            // Assert
            Asserter.AreEqual(actual: gridSquares.Width, expected: TestConstants.GridWidth);
            Asserter.AreEqual(actual: gridSquares.Height, expected: TestConstants.GridHeight);
        }