Zombieland



// Zombieland from Tallahassee's point of view.
include_once("zombies.php");
include_once("me.php");

function run() {
    $me = new me();
    $zombie = new array();

    //constructor -> zombie((int)$IQ,(bool)$LIMIT,(optional int)$numberOfZombies)
    //return array[] of zombies.
    $zombie[] = new zombie(10,false);

    foreach ($zombie as $zombie) {
        if ($zombie->inSight()) {
            $zombie->kill_zombie($zombie,$me->random_weapon());

            if ($zombie->zombie_kill_of_the_weak()) {
                $Sql->query("Kill_of_the_weak",$zombie->killedBy(),$zombie->weapon(),$zombie->date());
            }
        }
    }
    while ($me->isAlive()) {
        find_twinkie();

        if(!$twinkie_found) {
            $me->destroy_something();
        }
    }

}

run();
Vote up this code2
  • Adrià Caubet

    Oh! You forget to include rules.php! haha Great job