All I would simply like to do is move the walls up and down. I will post the code in its entirety ( each new tab will be in bold ). I hope someone can help me because it is irritating me.
BOX
class Box
{
// THIS BOX ASSUMES rectMode( CORNER );
// Properties
int x;
int y;
int w;
int h;
color c = color( 0 );
// Constructors
Box( int xx, int yy, int ww, int hh )
{
this.x = xx;
this.y = yy;
this.w = ww;
this.h = hh;
}
// Methods
void drawMe()
{
strokeWeight( 1 );
stroke( c );
noFill();
rect( x, y, w, h );
line( x, y, x+w, y+h );
line( x+w, y, x, y+h );
}
void moveTo( int newX, int newY )
{
x = newX;
y = newY;
}
/** This function returns true if 'this' Box is
* overlapping the 'otherBox'
*/
boolean isOverlapping( Box otherBox )
{
if ( this.x > otherBox.x + otherBox.w ) return false;