Skip to content

Instantly share code, notes, and snippets.

@markcmarino
Last active March 4, 2020 23:49
Show Gist options
  • Save markcmarino/9dc6a1413706f27ba227dbc2cafe4631 to your computer and use it in GitHub Desktop.
Save markcmarino/9dc6a1413706f27ba227dbc2cafe4631 to your computer and use it in GitHub Desktop.
An excerpt from Jon Corbett's portrait beading code
For(int x = 1; x <= NumberOfRows; x++){
switch(x % 2){
case 0:
For(currentColumn = NumberOfColumns; currentColumn > 0; currentColumn--){
placeBeadAt(x, currentColumn);
}
break;
default:
For(currentColumn = 1; currentColumn <= NumberOfColumns; currentColumn++){
placeBeadAt(x, currentColumn);
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment