Skip to content

Instantly share code, notes, and snippets.

@phl0w
Created September 23, 2012 15:07
Show Gist options
  • Select an option

  • Save phl0w/3771982 to your computer and use it in GitHub Desktop.

Select an option

Save phl0w/3771982 to your computer and use it in GitHub Desktop.
private Tree jobs = null;
public int loop() {
if (jobs == null) {
jobs = new Tree(new Node[]{new Mine(), new Drop()});
}
final Node job = jobs.state();
if (job != null) {
jobs.set(job);
getContainer().submit(job);
job.join();
return 0;
}
return Random.nextInt(200, 300);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment