function getReturnCode(key) {
    var fn_retvalue = tmpReturnValues.get(key);

    if (fn_retvalue === undefined) {
        fn_retvalue = identifier(6);
        tmpReturnValues.put(key, fn_retvalue);
    }

    return fn_retvalue;
}
Exemplo n.º 2
0
function Meeting (name, meet) {
  if(!meet) {
    this.id = identifier(3);
    this.name = name;
    this.attendees = [];
    this.total = 0;
    this.rate = 0; // per second
    this.timeStamp = new Date();
  }
  else {
    this.id = meet.id;
    this.name = meet.name;
    this.attendees = meet.attendees;
    this.total = meet.total;
    this.rate = meet.rate; // per second
    this.timeStamp = meet.timeStamp;
  }
}
Exemplo n.º 3
0
var Model = function(nickname) {

  this.id = identifier(5);
  this.nickname = nickname;
  this.vp = 0;
  this.rounds = 0;

  this.score = 0;
  
  this.cup = [];
  
  this.brains = [];
  this.shots = [];
  this.runners = [];
  this.modified = +new Date();

  for(var color in diceSet)
    for(var i=0; i<diceSet[color]; ++i)
      this.cup.push(new Die(color));
};