Can’t use a nested loop and i can ONLY use 1D loop to solve these patterns
please help me, thanks!!!
for (int i=0; i<4*8; i++) addObject(new Obj(), i%8, i/8);
for (int i=0; i<4*8; i++) if ( ((i%8)+(i/8)) %2 == 0 ) addObject(new Obj(), i%8, i/8);