This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import processing.sound.*; | |
| //Declare an array of location and objects | |
| //Set state for activeObject to be a DragObject track | |
| DragObject[] d; | |
| Location[] locs; | |
| int PIECES = 4; | |
| DragObject activeObj = null; | |
| int xOffset = 0; | |
| int yOffset = 0; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //Import processing sound so we can load a sound file | |
| import processing.sound.*; | |
| //Declare variable for the image, size of the image, and states of the image | |
| PImage img; | |
| int tileSize = 100; | |
| boolean shrinking = true; | |
| boolean shifted = false; | |
| //Initialize the sound file variable | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //This import allows us to use sound in our program | |
| import processing.sound.*; | |
| //We initialize a variable that will hole the sound file here so we can use it later | |
| SoundFile boing; | |
| //These variable are initialized to represent the position of the ball as well as the size | |
| float ballX, ballY; | |
| float ballSize = 50; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import processing.sound.*; | |
| //initializes a array of sound files | |
| SoundFile[] sounds = new SoundFile[6]; | |
| //Declares variables that give the shape structure | |
| int shapeSize = 100; | |
| float circleSize = 50; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //This setup function declares the size of the canvas and the frame rate | |
| void setup() { | |
| size(800, 800); | |
| frameRate(7); | |
| } | |
| /*This draw function is setting background color to a random color, | |
| then drawing rectangles and triangles | |
| of a random size and color on random points of the grid */ |