Hello
i am required to draw picket fence. At the moment i think i am way off. Each rectangle must not be drawn individually. They must go through a loop. I thought of an IF statement to draw the rectangles as long as the up left coord is <= 43. else it will draw the last bar to hold the pickets.
heres the code tell me what can be adjusted or that i am way off course.
#include "DarkGDK.h"
void DarkGDK ()
{
int boxHeight;
int boxWidth;
int upperLeftX;
int upperLeftY;
int lowerLeftX;
int lowerRightX;
int lowerRightY;
I'd say let "DarkGDK()" except some arguments for the start points of "upperLeftX" and "upperLeftY". Make "lowerRightX" and "lowerRightY" offsets of the previous two and you're all set. This way you can reuse this function in a number of cases.