/* 6.914, Example 0.12 You can cause something to change in some quantifiably measurable event by using an 'if' statement, which takes the form: if (statement-to-check) { code-to-execute } In the event that statement-to-check evaluates as true, the code-to-execute will run. If that statement is false, the code-to-execute will be skipped. So, for instance, if you want to increment a variable x up until a certain point (like x = 50) you could run the following code: if (x < 50){ x++; } Here's an example of that in practice. */ int startXvar = 50; void setup(){ size(200, 200); } void draw(){ background(50); // use background to "clear the screen" rect(startXvar, 100, 30, 30); startXvar++; if (startXvar > 200) { startXvar = 30; // as soon as startXvar exceeds 200, it will return to 30 } }