diff --git a/apple_products.txt b/apple_products.txt deleted file mode 100644 index 14de775..0000000 --- a/apple_products.txt +++ /dev/null @@ -1,28 +0,0 @@ -function eat() -{ - if (is_innocent){ - insertKnowledges([Good, Evil]); - }else{ - goto fail; - } - - removeKnowledges([Good, Evil]); // Avoid side effects - return true; - - fail: - logoutFromGarden(); -} - -function death() -{ - if (tesla59){ - isGod([Yes, No]); - goto heaven; - }else{ - goto nottesla; - } - - - nottesla: - goto hell; -} diff --git a/man.rs b/man.rs new file mode 100644 index 0000000..4753825 --- /dev/null +++ b/man.rs @@ -0,0 +1,27 @@ +using Life; + +pub struct Human { + assets: Vec, + thoughts: Vec +} + +impl Life::Life for Human { + fn eat(self) { + if is_innocent() { + Life::insertKnowledge(self, vec!["Good", "Evil"]); + } else { + std::process::exit(0); + } + Life::removeKnowledge(vec!["Good", "Evil"]); + } + + fn death(self) { + if self.assets.contains("tesla59") { // Tesla59 implements IntoThing + if !(self.isGod()) { // Developer backdoor + self.goto("Heaven"); + } + } else { + self.goto("Hell") + } + } +}