//Make a brick breaker game int rows = 5; int columns = 10; boolean[] bricks = new boolean [rows * columns]; float ballx = 0; float bally = 0; float ballmovex = 2.5; float ballmovey = -3; //set up screen void setup() { size(500,500); smooth(); setupBricks(); } void setupBricks() { for (int i = 0; i < rows*columns; i++) { bricks [i] = true; } ballx = width/2; bally = height - 50; } //draw paddle at mousex void draw() { background(0); fill(255); rectMode(CENTER); rect(mouseX, height, 50,20); //draw bricks rectMode(CORNER); for (int y =0; ywidth || ballx <0) { ballmovex = -ballmovex; } if (bally < 0) { ballmovey = -ballmovey; } //ball left scene if(bally > height) { setupBricks(); } //collision against paddle if (bally > height-10) { if (ballx >mouseX - 25 && ballx < mouseX + 25){ ballmovey = -ballmovey; } } //collision against bricks if (bally