class Square extends Soldier { Square(float x, float y) { super(x, y); } /* draws the soldier */ void draw() { // draw the shape first fill(colour); rectMode(CENTER); rect(xPos, yPos, strength+MIN_SIZE, strength+MIN_SIZE); rectMode(CORNER); // draw the number over it fill(0); text(strength, xPos, yPos); } }