The Gobo
The gobo light is a metaphor for an if/else statement. The aim of the game in this gobo light object metaphor is to get the right pattern and it is either true or false. This is the same as when using if/else statements in a code. An if/else statement is when the computer reaches a condition in a code, for example in the metaphor the condition will be the addition of slides on the computer it might concern the position of the mouse. If the condition is true then the if statement will run in the metaphor this means the correct pattern will be shown, matching that of the pictures shown, in terms of a code the position of the mouse when placed in a certain area of the screen might make the image change colour. If the condition is false then the else statement will run, in terms of the metaphor this means that the wrong slides are placed and thus will not result in the same image as the picture shown, on the code this means the mouse is not in the right position and thus will make the image appear a different colour. If this metaphor was written into a code this is what it would look like;
for ( int L= plain light){
if(the pink slide and stripe pattern is placed on box){
the pattern is correct ( L=pink light, stripe pattern );
}
else (a combination of other slides are attached){
the pattern is incorrect (random pattern);
}
This pseudo code is only a segment and in a real code would continue on with a new condition each time a new pattern from the picture is recreated. The thing that is correct would change along with the condition.

No comments:
Post a Comment