9:02 Friday 30 April 2010Blog

Of actionscript and emotion

function random(min:Number, max:Number):Number {
    var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
    return randomNum;
}

function Spotify() {
    var r:Number = Math.round(random(0,1));
    if (r == 1) {
        var emotion:String = "likes";
    } else {
        var emotion:String = "loathes";
    }
    trace ("decides that today he "+emotion+" Spotify");
}

Spotify();

Comments

No comments have been posted yet.

Leave a comment