Skip to content

Instantly share code, notes, and snippets.

@Caellian
Created September 10, 2016 21:26
Show Gist options
  • Save Caellian/2f3e5b5edd5252a573821b2179b69b19 to your computer and use it in GitHub Desktop.
Save Caellian/2f3e5b5edd5252a573821b2179b69b19 to your computer and use it in GitHub Desktop.
#include<life>
int main(void) {
while (true) {
try {
if (!live()) {
die();
}
} catch (const life::failiure& failiure) {
LiveState *state = failiure->getLifeState();
while(state->canImprove(failiure->getType()) {
if (!state->safeImprove(failiure->getType()) && state->forceImprove(failiure->getType())) {
//Why even try?
break;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment