Subject: I can do you one better. ^_^
Author:
Posted on: 2016-03-16 12:00:00 UTC

function shipfest()
{
//Set up our vic-- er, characters.
var innocentnewbie = "Larfen J. Stocke, esq";
var experienced
oldbie = "Desdendelle";

//Set up the location.
var theboard = new Array();

//And keep a count of how much wild shipping has been going on
var hours
ofshipping = 0;

// Cycle through the Board clock hour by hour
for (clock
time = 0; clocktime {

//Des seems to be around from 7 am to 7pm
//So put him on
if (clock
time == 7)
{
theboard.push(experiencedoldbie);
}
//And take him off
else if (clocktime == 19)
{
for (board
count = 0; boardcount {
if (the
board[boardcount] == experiencedoldbie)
{
delete theboard[boardcount];
}
}
}
//Larfen is up from Board-midnight to about 5, then from 8pm to midnight.
//So two ons
if (clocktime == 0)
{
the
board.push(innocentnewbie);
}
else if (clock
time == 20)
{
theboard.push(innocentnewbie);
}
//And one off
else if (clocktime == 5)
{
for (board
count = 0; boardcount {
if (the
board[boardcount] == innocentnewbie)
{
delete theboard[boardcount];
}
}
}

//If both Des and Larfen are around, shipping can occur.

for (deschecker = 0; deschecker {
if (theboard[deschecker] == experiencedoldbie)
{
for (larfen
checker = 0; larfenchecker {
if (the
board[larfenchecker] == innocentnewbie)
{
hoursofshipping += 1;
}
}
}
}



}
//And print out a popup of how much shipping has gone on.
window.alert(hoursofshipping);
//The tragic conclusion:
//The love of Desdendelle and Larfen J. Stocke, esq is doomed
//because they're never around at the same time.

}

hS

(JavaScript, btw.)

Reply Return to messages