Here are the new variables that we will declare:
private ArrayList<UpperBoundary> upperBoundary;private ArrayList<LowerBoundary> lowerBoundary;private int maxBoundaryHeight;private int minBoundaryHeight;private boolean upBound = true;private boolean lowBound = true;private int progressDenom = 20;private boolean newGameCreated;
We create our upperBoundary and lowerBoundary variables as ArrayList to keep a track of our actual game object on the screen, then we also create two integer variables--maxBoundaryHeight and minBoundaryHeight--to keep a track of the maximum and minimum heights for our upper boundary. We also create two Boolean variables--upBound and lowBound--if our boundaries go out of our specified ...