static void Initialize(Engine engine) { int startRow = 3; int startCol = 2; int endCol = WorldCols - 2; for (int i = startCol; i < endCol; i++) { Block currBlock = new Block(new MatrixCoords(startRow, i)); engine.AddObject(currBlock); } //10 ExplodingBlock exBlock = new ExplodingBlock(new MatrixCoords(4,30)); engine.AddObject(exBlock); //END 10 //01.The AcademyPopcorn class contains an IndestructibleBlock class. //Use it to create side and ceiling walls to the game. You can ONLY edit the //AcademyPopcornMain.cs file. for (int row = 0; row < 40; row++) { IndestructibleBlock leftSideBlock = new IndestructibleBlock(new MatrixCoords(row, 0)); IndestructibleBlock rightSideBlock = new IndestructibleBlock(new MatrixCoords(row, WorldCols - 1)); engine.AddObject(leftSideBlock); engine.AddObject(rightSideBlock); } for (int col = 0; col < WorldCols; col++) { IndestructibleBlock ceilingBlock = new IndestructibleBlock(new MatrixCoords(0, col)); engine.AddObject(ceilingBlock); } //END 01 //05 TrailObject trailObj = new TrailObject(new MatrixCoords(8, 8), 8); //engine.AddObject(trailObj); //END 05 //07.Test the MeteoriteBall by replacing the normal ball in the AcademyPopcornMain.cs file. MeteoriteBall metBall = new MeteoriteBall(new MatrixCoords(WorldRows / 2, 0), new MatrixCoords(-1, 1)); engine.AddObject(metBall); //END 07 //09 ImpassableBlock imPassBlock = new ImpassableBlock(new MatrixCoords(4, 7)); engine.AddObject(imPassBlock); UnstoppableBall unstopBall = new UnstoppableBall(new MatrixCoords(WorldRows / 2, 0), new MatrixCoords(-1, 1)); //engine.AddObject(unstopBall); //END 09 //12 GiftBlock gift = new GiftBlock(new MatrixCoords(7,25)); engine.AddObject(gift); //END 12 //Ball theBall = new Ball(new MatrixCoords(WorldRows / 2, 0), // new MatrixCoords(-1, 1)); //engine.AddObject(theBall); Racket theRacket = new Racket(new MatrixCoords(WorldRows - 1, WorldCols / 2), RacketLength); engine.AddObject(theRacket); }
static void Initialize(Engine engine) { int startRow = 3; int startCol = 2; int endCol = WorldCols - 2; // standart blocks #region Standart Blocks for (int row = 2; row < 5; row++) { for (int col = startCol; col < endCol; col++) { Block standartBlock = new Block(new MatrixCoords(row, col)); engine.AddObject(standartBlock); } } #endregion #region GameField Walls for (int row = 0; row < WorldRows - 2; row++) { IndestructibleBlock leftWallBlock = new IndestructibleBlock(new MatrixCoords(row + 2, startCol - 2)); IndestructibleBlock rightWallBlock = new IndestructibleBlock(new MatrixCoords(row + 2, endCol + 1)); engine.AddObject(rightWallBlock); engine.AddObject(leftWallBlock); } for (int col = 0; col < WorldCols; col++) { IndestructibleBlock topWallBlock = new IndestructibleBlock(new MatrixCoords(startRow - 2, col)); engine.AddObject(topWallBlock); } #endregion #region Impassable Blocks for (int col = 1; col < WorldCols - 1; col++) { //if (col == 1 || col == 2) continue; ImpassableBlock imBlock = new ImpassableBlock(new MatrixCoords(11, col)); engine.AddObject(imBlock); } #endregion #region Explosion Blocks for (int col = 2; col < WorldCols - 1; col += 1) { ExplodingBlock expBlock = new ExplodingBlock(new MatrixCoords(5, col)); engine.AddObject(expBlock); } #endregion #region Gift Blocks for (int col = 1; col < WorldCols - 1; col += 5) { GiftBlock giftBlocks = new GiftBlock(new MatrixCoords(6, col)); engine.AddObject(giftBlocks); } #endregion Ball theBall = new MeteoriteBall(new MatrixCoords(WorldRows / 2, 0), new MatrixCoords(-1, 1)); engine.AddObject(theBall); Racket theRacket = new Racket(new MatrixCoords(WorldRows - 1, WorldCols / 2), RacketLength); engine.AddObject(theRacket); }
static void Initialize(Engine engine) { int startRow = 3; int startCol = 2; int endCol = WorldCols - 2; for (int i = startCol; i < endCol; i++) { Block currBlock = new Block(new MatrixCoords(startRow, i)); engine.AddObject(currBlock); } //10 ExplodingBlock exBlock = new ExplodingBlock(new MatrixCoords(4, 30)); engine.AddObject(exBlock); //END 10 //01.The AcademyPopcorn class contains an IndestructibleBlock class. //Use it to create side and ceiling walls to the game. You can ONLY edit the //AcademyPopcornMain.cs file. for (int row = 0; row < 40; row++) { IndestructibleBlock leftSideBlock = new IndestructibleBlock(new MatrixCoords(row, 0)); IndestructibleBlock rightSideBlock = new IndestructibleBlock(new MatrixCoords(row, WorldCols - 1)); engine.AddObject(leftSideBlock); engine.AddObject(rightSideBlock); } for (int col = 0; col < WorldCols; col++) { IndestructibleBlock ceilingBlock = new IndestructibleBlock(new MatrixCoords(0, col)); engine.AddObject(ceilingBlock); } //END 01 //05 TrailObject trailObj = new TrailObject(new MatrixCoords(8, 8), 8); //engine.AddObject(trailObj); //END 05 //07.Test the MeteoriteBall by replacing the normal ball in the AcademyPopcornMain.cs file. MeteoriteBall metBall = new MeteoriteBall(new MatrixCoords(WorldRows / 2, 0), new MatrixCoords(-1, 1)); engine.AddObject(metBall); //END 07 //09 ImpassableBlock imPassBlock = new ImpassableBlock(new MatrixCoords(4, 7)); engine.AddObject(imPassBlock); UnstoppableBall unstopBall = new UnstoppableBall(new MatrixCoords(WorldRows / 2, 0), new MatrixCoords(-1, 1)); //engine.AddObject(unstopBall); //END 09 //12 GiftBlock gift = new GiftBlock(new MatrixCoords(7, 25)); engine.AddObject(gift); //END 12 //Ball theBall = new Ball(new MatrixCoords(WorldRows / 2, 0), // new MatrixCoords(-1, 1)); //engine.AddObject(theBall); Racket theRacket = new Racket(new MatrixCoords(WorldRows - 1, WorldCols / 2), RacketLength); engine.AddObject(theRacket); }