@6, no. Find another use of the counter. Something like:
int index=0;
...
// in loop
...
// C++ example, similar enough to BGT
if (index-1<0) {
// re-speak the message just spoken, we're at the edge of the buffer
} else if (index+1>array.size()-1) {
// out of bounds if we increase index, replay last message
} else if (index-1>=0) {
// play message at index
} else if (index+1<=array.size()-1) {
// play message...
}
That's a bit bulky, but works.
"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." — Charles Babbage.
My Github