Created
May 20, 2015 10:14
-
-
Save maephisto/a9a451a5ea4fc60a1437 to your computer and use it in GitHub Desktop.
Bohemian Rhapsody in Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
assert(Life.isReal); | |
assert(Life.isFantasy); | |
} catch (LandSlideException ex) { | |
while(!Reality.isEscapable) { | |
self.eyes.forEach(function(eye) { | |
eye | |
.open() | |
.lookTo(Sky) | |
.see(); | |
}); | |
self.wealth = null; | |
self.ageState = AgeState.Boy; | |
self.sympathies.clear(); | |
if (self.comeDificulty === Dificulty.Easy && | |
self.goDificulty === Dificulty.Easy && | |
self.high < 0.1 && | |
self.low < 0.1) { | |
switch(Wind.direction) { | |
case Direction.North: | |
case Direction.South: | |
case Direction.East: | |
case Direction.West: | |
default: | |
self.matter = false; | |
Piano.play(1200); | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment