Skip to content

Instantly share code, notes, and snippets.

@jeanlaurent
Created September 26, 2013 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeanlaurent/6714706 to your computer and use it in GitHub Desktop.
Save jeanlaurent/6714706 to your computer and use it in GitHub Desktop.
public class Omnibus {
String commands[] = {
"OPEN","CLOSE","UP",
"OPEN","CLOSE","UP",
"OPEN","CLOSE","UP",
"OPEN","CLOSE","UP",
"OPEN","CLOSE","UP",
"OPEN","CLOSE","DOWN",
"OPEN","CLOSE","DOWN",
"OPEN","CLOSE","DOWN",
"OPEN","CLOSE","DOWN",
"OPEN","CLOSE","DOWN",
};
int count = 0;
public String next() {
return commands[(count++)%commands.length];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment