public void TestBuildsBricks3() { var builder = new GameWorldBuilder(); builder.BuildField(new Size(70, 40)); builder.BuildBricks(2); var world = builder.GetResult(); var expected = new List <Brick>() { new Brick(new Point(25, 15), new Size(30, 10)), new Brick(new Point(55, 15), new Size(30, 10)), new Brick(new Point(25, 25), new Size(30, 10)), new Brick(new Point(55, 25), new Size(30, 10)), }; Assert.AreEqual(expected, world.Bricks); }
public static void Main() { var builder = new GameWorldBuilder(); builder.BuildField(new Size(210, 300)); builder.BuildWalls(); builder.BuildVoid(); builder.BuildBall(); builder.BuildBricks(3); builder.BuildPaddle(); var state = builder.GetResult(); state.BrickDestroy += (sender, args) => { Console.WriteLine("destroyed brick"); }; state.Failure += (IChannelSender, args) => { Console.WriteLine("FAILURE"); }; Application.Run(new MyForm(state)); }