Skip to content

Instantly share code, notes, and snippets.

@xenor
Created June 28, 2011 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xenor/1051554 to your computer and use it in GitHub Desktop.
Save xenor/1051554 to your computer and use it in GitHub Desktop.
yay, i discovered the world-algorithm
<?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