User:Laurier Rochon/prototyping/silence

From XPUB & Lens-Based wiki
< User:Laurier Rochon
Revision as of 11:29, 9 May 2011 by Laurier Rochon (talk | contribs) (Created page with "I don't think she was able to read the print... <source lang='text'> Idiot yourself shut music. Shut yourself music idiot. Music shut that idiot. Idiot kill music yourself. Mus...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I don't think she was able to read the print...


Idiot yourself shut music.
Shut yourself music idiot.
Music shut that idiot.
Idiot kill music yourself.
Music yourself kill idiot.
Kill music that idiot.
That music idiot kill.
Idiot music that kill.
Idiot yourself music shut.
Idiot shut music yourself.
Yourself music kill idiot.
Idiot that kill music.
Shut yourself idiot music.
Idiot music kill yourself.
That kill music idiot.
Idiot that shut music.
Music idiot shut yourself.
Idiot yourself music kill.
Idiot kill that music.
Shut yourself music idiot.


<?php

class Sentence{

	var $subject;
	var $verb;
	var $noun;
	var $thisorthat;
	var $space = ' ';
	var $period = '.';
	var $all = '';
	var $pieces;

	function __construct(){
		$this->pieces = array($this->addsubject(),$this->addverb(),$this->addnoun(),$this->addthisorthat());
		shuffle($this->pieces);
		array_push($this->pieces,'.');
		for($a=0;$a<count($this->pieces);$a++){
			$this->all .= $this->uc($this->pieces[$a],$a);
			if($a<count($this->pieces)-2){
				$this->all .= $this->space;
			}
		}
	}

	function uc($word,$pos){
		if($pos==0){
			return ucfirst($word);
		}else{
			return $word;
		}
	}	
	
	function addsubject(){
		$this->subject = 'idiot';
		return $this->subject;
	}

	function addverb(){
		$verbs = array('kill','shut','kills');
		$this->verb = $verbs[rand(0,1)];
		return $this->verb;
	}

	function addthisorthat(){
		$thisorthat = array('yourself','that');
		$this->thisorthat = $thisorthat[rand(0,1)];
		return $this->thisorthat;
	}

	function addnoun(){
		$this->noun = 'music';
		return $this->noun;
	}
	
}

$sentencelist = array();
$nb = 20;

for($i=0;$i<$nb;$i++){
	$sentencelist[$i] = new Sentence();
	echo $sentencelist[$i]->all;
	echo '<br />';
}

?>