Created
June 28, 2011 16:41
-
-
Save xenor/1051554 to your computer and use it in GitHub Desktop.
yay, i discovered the world-algorithm
This file contains 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
<?php | |
include "universe.class.php"; | |
$universe = new Universe(42); | |
include "world.class.php"; | |
$world = new World($universe); | |
include "life.class.php"; | |
$xenor = new Human(); | |
$exashox = new Human(); | |
include "heaven.class.php"; | |
$heaven = new Heaven(); | |
$cloud = $heaven->getRandomCloud(); | |
$house = $cloud->buildHouse(); | |
unset($cloud); | |
$neo = new Angel(); | |
$house->setBewohner($neo); | |
include "minorLifeforms.class.php"; | |
$larni = new Predator(); | |
while(!$world->is2012()) | |
{ | |
$world->executeEvents(); | |
if($xenor->sees($larni)) | |
{ | |
$xenor->screamAt($larni,"FUCK YOU, I WON'T DO WHAT YOU TELL ME!"); | |
while($xenor->triesToKill($larni)) | |
{ | |
if($xenor->isReallyAngry()) | |
{ | |
$world->enableGodRights($xenor); | |
$xenor->pieks($larni); // larni is killed | |
$world->disableGodRights($xenor); | |
} | |
} | |
} | |
if($larni->sees($xenor)) | |
{ | |
$larni->attack(getarmedweapon($larni),$xenor); | |
} | |
if($larni->isBleeding()) | |
{ | |
$guysNearHim = $world->getPeopleNear($larni->getPosition()); | |
foreach($guysNearHim as $key => $guy) | |
{ | |
$guy->getTheSkinVollWeggeaetztByTheBloodOf($larni); | |
$larni->highscore++; | |
} | |
} | |
if(!$xenor->got($neo)) | |
{ | |
$xenor->isAlive = null; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment