Fantsay DJ Lineup Algorithm

/*
Book your fantasy DJ lineup
Watch scores change week by week
Compete to finish with the highest scoring lineup
*/

// Fuckability Factor == ff == swagger + likability + appeal to 16 year old girls,

// results in +dq (increased Douche Quotient)

// Douche Quotient == dq == lame posts/quotes/tweets + pointless moves + appeal to 16 year old girls,

// results in -ff (decreased Fuckability Factor)

// Street Cred == sc == skills + paid dues + consistency,

// results in +ff (increased Fuckability Factor)

// Big Ups == caused by helping a competing DJ, hooking up fan in need or giving back to community,

// results in -dq, +ff (decreased Douche Quotient, increased Fuckability Factor)

function Dj(name, genre, fuckabilityFactor, doucheQuotient, streetCred){

this.constructor.population++;

// Setting the “age” of a DJ to determine how long they last in this mini game cycle

// A full version would have a set cycle length (festival season)

// Multiple players would compete to have the highest scoring DJ Lineup in that cycle

var alive = true, age=1;

var maxAge 50+Math.round(Math.random()*15)+Math.round(Math.random()*15);

function makeOlder(){

return alive = (++ age <= (maxAge overKill));

}

var myName= name;

this.toString = this.getName = function() {

return myName;

}

// Function to call when an event raises a DJ’s Fuckability Factor

this.raiseFf = function() {

if (makeOlder()){

this.ff += 2;

this.dq += 1;

this.overKill++;

return[ff, dq, sc];

} else alert(myName+” got a real job and is no longer a DJ.”);

}

// Function to call when an event raises a DJ’s Douche Quotient

this.raiseDq=function(){

if (makeOlder()){

this.dq += 2;

this.sc -= 1;

this.overKill++;

return[ff, dq, sc];

} else alert(myName+” is trimming for the rest of the season.”);

}

// Function to call when an event raises a DJ’s Street Cred

this.raiseSc=function(){

if (makeOlder()){

this.sc += 2;

this.ff += 1;

this.overKill++;

return[ff, dq, sc];

} else alert(myName+” did too much space coke, is laying low for a while.”);

}

// Function to call when an event lowers a DJ’s Street Cred

this.lowerSc=function(){

if (makeOlder()){

this.sc -= 2;

this.ff -= 1;

this.overKill++;

return[ff, dq, sc];

} else alert(myName+” is going to graduate school or something.”);

}

// Good deeds lower a DJ’s Douche Quotient

this.bigUps=function(){

if (makeOlder()){

this.dq -= 1;

this.overKill++;

return[ff, dq, sc];

} else alert(myName + ” had a kid.”);

}

this.getFf = function(){

return this.ff;

}

this.getDq = function() {

return this.dq;

}

this.getSc=function() {

return this.sc;

}

this.muchTimePasses= function() {

age += 20;

this.overKill = 10;

}

this.getGenre=function() {

return genre;

}

this.ff = fuckabilityFactor;

this.dq = doucheQuotient;

this.sc = streetCred;

this.overKill = 0;

this.gear = “An old laptop filled with cracked software”;

}

Dj.prototype.bookOutOfTown = function() {

this.overKill -= 1;

this.streetCred += 1;

}

// add function that changes population based on how many people are playing

Dj.population = 0;

function festivalSeason() {

// to be populated with current touring DJs

// example DJ below

var ill-esha = new Dj(“ill-esha”, “bass music, glitch, originals.”, 1, 1, 1);       //New instance of the Dj object created. 

var snarky = new Dj(“DJ Snarky”, “you probably haven’t heard of it.”, 1, 2, 1);        

alert(“There are now “+Dj.population+” DJs”);

alert(ill-esha + ” is known for “ + ill-esha.getGenre());

ill-esha.muchTimePasses();

ill-esha.newGear = function(){

if (this.dq < 10) {

this.sc += 1;

this.ff += 1;

}

this.gear = “New macbook pro, clean software for real”;

};

ill-esha.newGear();

ill-esha.bookOutOfTown();

alert(“Seasoned “ + ill-esha + ” has a Fuckability Factor of “ 

+ill-esha.getFf() +“, a Douche Quotient of “ 

+ill-esha.getDq() +“, and “

+ill-esha.getSc() + ” Street Cred.”);

ill-esha.muchTimePasses();

}

// check out the github

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s