Skip to content

Instantly share code, notes, and snippets.

@chrisza4
Created December 1, 2019 04:29
Show Gist options
  • Select an option

  • Save chrisza4/eadec25419585d0d2f9cebbb22af2b11 to your computer and use it in GitHub Desktop.

Select an option

Save chrisza4/eadec25419585d0d2f9cebbb22af2b11 to your computer and use it in GitHub Desktop.
// Fetching logic
var matters = Api.getUserMatters(userId);
foreach (var matter of matters) {
GameEngine.getInstance().Matters.add(matter)
sleep(300)
}
class GameEngine { // Singleton
public IEnumerable<Matter> Matters;
public void ExecuteGameLoop () {
foreach (var matter in this.Matters) {
if (this.isRendered(matter)) {
continue;
}
this.render(matter)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment