if (nunchuck_plugged_in)
{
delay_frame_or_break_for_z(&nunchuck, 60*15);
}
TV.clear_screen();
as we've no nunchucks to work with yet. Changed the choices then to use a random selection for the first screen and a random pattern (rather than just #1):
void loop()
{
int which = random(0,3);
int pat = random(1,NUM_OF_PATTERNS + 1);
switch (which)
{
case 0:
randomize_buffer(); //uncomment this, and comment the other two lines here to get the field to begin randomly
break;
case 1:
load_pattern_into_buffer(patterns[pat]); //uncomment this, and comment the other two lines here to start with a pattern
break;
case 2:
make_glider(32,32); //uncomment this, and comment the other two lines here to start with a simple glider
break;
}
Learned you can't create a var inside the case stmt. body too!
Thanks!
