class Ground { int xrep,zrep,tiles,xsize,zsize; Ground(int tile, int xs, int zs) { tiles = tile; xsize = xs; zsize = zs; int ox = -100; int oz = -100; } void display() { pushMatrix(); translate(0,.2,1); rotateX(PI/2); int ox = -tiles*xsize/2; int oz = -tiles*zsize/2; for(int j = 0; j < tiles; j++) { ox = -tiles*xsize/2; for(int i = 0; i < tiles; i++) { stroke(125); rect(ox,oz,xsize,zsize); ox+=xsize; } ox = -100; oz+=zsize; } popMatrix(); } }