Oh say can you see
in reference to @libertad #21 I wrote this poem in reference to the national anthem thing.
Those of you that speak javascript might find it funny.
<html>
<body>
<script type="text/javascript">
illegalAlienYearningForLivingWage = function(name){
var t=this;
t.name= name;
t.languageSpoken = 'english';
t.alive=1;
t.health=100;
t.englishCompetency=0;
t.illegalStatus=1;
t.toHTML();
};
illegalAlienYearningForLivingWage.prototype.see = function(condition){
this.lyricsSung = condition;
this.report(this.name+' sang '+this.lyricsSung);
switch(condition){
case "by the dawn's early light":
this.becomesAmerican();
break;
case "a la luz de la aurora":
this.removeFromCountry();
break;
}
this.updateStats();
};
illegalAlienYearningForLivingWage.prototype.becomesAmerican = function(){
this.usCitizenship=true;
this.chanceForLivingWage = true;
this.illegalStatus=0;
window.document.body.style.backgroundColor ='blue';
alert('congratulations '+this.name+' you sang in english you can be american')
}
illegalAlienYearningForLivingWage.prototype.removeFromCountry = function(){
this.report("pablo was send back to mexico");
this.tryAndReturnByCrossingTheBorderForALivingWage();
if(this.health > 0){
this.tryAndLearnEnglishWorking70HoursInAFieldPickingStrawberries();
if(this.englishCompetency < 80){
this.usCitizenship=false;
this.chanceAtLivingWage = false;
} else {
this.see("by the dawn's early light");
}
} else {
window.document.body.style.backgroundColor ='red';
alert(this.name+' died at a cattle ranch getting shot by neonazis. Game over');
this.health=0;
}
this.updateStats();
};
illegalAlienYearningForLivingWage.prototype.tryAndLearnEnglishWorking70HoursInAFieldPickingStrawberries = function(){
var english_learned = Math.floor(Math.random()*20);
this.report(this.name+' learned '+english_learned+'% more english working 70 hours a week picking strawberries in a field');
return this.englishCompetency += english_learned;
};
illegalAlienYearningForLivingWage.prototype.tryAndReturnByCrossingTheBorderForALivingWage = function(){
health_lost = Math.floor(Math.random()*20);
this.report(this.name+ 'lost '+health_lost+'% health on the journey');
this.health -=health_lost;
};
illegalAlienYearningForLivingWage.prototype.toHTML = function(){
var t=this;
t.story = document.createElement('div');
btn = document.createElement('button');
btn.appendChild(document.createTextNode('Try and sing in english'));
dat = document.createElement('div');
statsLyrics =document.createElement('p');
statsLyrics.appendChild(document.createTextNode('Lyrics Sung: '));
t.statsLyricsSung = document.createElement('span');
t.statsLyricsSung.appendChild(document.createTextNode(''));
statsLyrics.appendChild(this.statsLyricsSung);
statsEnglishCompetency =document.createElement('p');
statsEnglishCompetency.appendChild(document.createTextNode('English Competetcy: '));
t.statsEnglishCompetencyPercent = document.createElement('span');
t.statsEnglishCompetencyPercent.appendChild(document.createTextNode(''));
statsEnglishCompetency.appendChild(this.statsEnglishCompetencyPercent);
statsHealth =document.createElement('p');
statsHealth.appendChild(document.createTextNode('Heath: '));
t.statsHealthPercent = document.createElement('span');
t.statsHealthPercent.appendChild(document.createTextNode(''));
statsHealth.appendChild(this.statsHealthPercent);
dat.appendChild(statsLyrics);
dat.appendChild(statsEnglishCompetency);
dat.appendChild(statsHealth);
window.document.body.appendChild(btn);
window.document.body.appendChild(dat);
window.document.body.appendChild(t.story);
btn.onclick = function(){
t.story.innerHTML ='';
t.see("a la luz de la aurora");
}
}
illegalAlienYearningForLivingWage.prototype.updateStats = function(){
this.statsLyricsSung.firstChild.data = this.lyricsSung;
this.statsHealthPercent.firstChild.data = this.health;
this.statsEnglishCompetencyPercent.firstChild.data = this.englishCompetency;
};
illegalAlienYearningForLivingWage.prototype.report = function(info){
this.story.innerHTML += '<br />'+info;
}
pablo = new illegalAlienYearningForLivingWage('pablo');
</script>
</body>
</html>
Those of you that speak javascript might find it funny.
<html>
<body>
<script type="text/javascript">
illegalAlienYearningForLivingWage = function(name){
var t=this;
t.name= name;
t.languageSpoken = 'english';
t.alive=1;
t.health=100;
t.englishCompetency=0;
t.illegalStatus=1;
t.toHTML();
};
illegalAlienYearningForLivingWage.prototype.see = function(condition){
this.lyricsSung = condition;
this.report(this.name+' sang '+this.lyricsSung);
switch(condition){
case "by the dawn's early light":
this.becomesAmerican();
break;
case "a la luz de la aurora":
this.removeFromCountry();
break;
}
this.updateStats();
};
illegalAlienYearningForLivingWage.prototype.becomesAmerican = function(){
this.usCitizenship=true;
this.chanceForLivingWage = true;
this.illegalStatus=0;
window.document.body.style.backgroundColor ='blue';
alert('congratulations '+this.name+' you sang in english you can be american')
}
illegalAlienYearningForLivingWage.prototype.removeFromCountry = function(){
this.report("pablo was send back to mexico");
this.tryAndReturnByCrossingTheBorderForALivingWage();
if(this.health > 0){
this.tryAndLearnEnglishWorking70HoursInAFieldPickingStrawberries();
if(this.englishCompetency < 80){
this.usCitizenship=false;
this.chanceAtLivingWage = false;
} else {
this.see("by the dawn's early light");
}
} else {
window.document.body.style.backgroundColor ='red';
alert(this.name+' died at a cattle ranch getting shot by neonazis. Game over');
this.health=0;
}
this.updateStats();
};
illegalAlienYearningForLivingWage.prototype.tryAndLearnEnglishWorking70HoursInAFieldPickingStrawberries = function(){
var english_learned = Math.floor(Math.random()*20);
this.report(this.name+' learned '+english_learned+'% more english working 70 hours a week picking strawberries in a field');
return this.englishCompetency += english_learned;
};
illegalAlienYearningForLivingWage.prototype.tryAndReturnByCrossingTheBorderForALivingWage = function(){
health_lost = Math.floor(Math.random()*20);
this.report(this.name+ 'lost '+health_lost+'% health on the journey');
this.health -=health_lost;
};
illegalAlienYearningForLivingWage.prototype.toHTML = function(){
var t=this;
t.story = document.createElement('div');
btn = document.createElement('button');
btn.appendChild(document.createTextNode('Try and sing in english'));
dat = document.createElement('div');
statsLyrics =document.createElement('p');
statsLyrics.appendChild(document.createTextNode('Lyrics Sung: '));
t.statsLyricsSung = document.createElement('span');
t.statsLyricsSung.appendChild(document.createTextNode(''));
statsLyrics.appendChild(this.statsLyricsSung);
statsEnglishCompetency =document.createElement('p');
statsEnglishCompetency.appendChild(document.createTextNode('English Competetcy: '));
t.statsEnglishCompetencyPercent = document.createElement('span');
t.statsEnglishCompetencyPercent.appendChild(document.createTextNode(''));
statsEnglishCompetency.appendChild(this.statsEnglishCompetencyPercent);
statsHealth =document.createElement('p');
statsHealth.appendChild(document.createTextNode('Heath: '));
t.statsHealthPercent = document.createElement('span');
t.statsHealthPercent.appendChild(document.createTextNode(''));
statsHealth.appendChild(this.statsHealthPercent);
dat.appendChild(statsLyrics);
dat.appendChild(statsEnglishCompetency);
dat.appendChild(statsHealth);
window.document.body.appendChild(btn);
window.document.body.appendChild(dat);
window.document.body.appendChild(t.story);
btn.onclick = function(){
t.story.innerHTML ='';
t.see("a la luz de la aurora");
}
}
illegalAlienYearningForLivingWage.prototype.updateStats = function(){
this.statsLyricsSung.firstChild.data = this.lyricsSung;
this.statsHealthPercent.firstChild.data = this.health;
this.statsEnglishCompetencyPercent.firstChild.data = this.englishCompetency;
};
illegalAlienYearningForLivingWage.prototype.report = function(info){
this.story.innerHTML += '<br />'+info;
}
pablo = new illegalAlienYearningForLivingWage('pablo');
</script>
</body>
</html>


























