Monday, October 01, 2018

Proposal: needs more randomization

Reached quorum 5-2 with 2 DEF votes

Adminned at 03 Oct 2018 00:22:48 UTC

Replace the text of “Master Control Program” with the following:


// MASTER CONTROL PROGRAM

var GNDT = `__GNDT`;
var MCPOutput = "";
var GNDTArray = [];

if (GNDT == "__" + "GNDT") {
  printLine("Illegal execution? A GNDT dump must be provided.");
} else {
  var GNDTLines = GNDT.split("\n");

  GNDTLines.forEach(function(entry) {
    GNDTArray.push(entry.split("\t"));
  });

  printLine("RESET " + randomPlayer());

  for (var i = 0; i < 5; i++) {
    var msg = "";
    if (!randBetween(0, 5))
      msg = "RESET " + randomPlayer();
    else {
      msg = "SET " + randomPlayer() + " ";
      if (randBetween(0, 1))
        msg += "INPUT";
      else
        msg += "OUTPUT";
      msg += " TO " + randomChar() + randomChar();
    }
    printLine(msg);
  }
}

function randBetween(x, y) {
  return Math.floor(Math.random() * (y - x + 1)) + x;
}

function randomPlayer() {
  return GNDTArray[randBetween(0, GNDTArray.length - 1)][0];
}

function randomChar() {
  return String.fromCharCode(randBetween(33, 126));
}

function printLine(message) {
  MCPOutput += "[" + message + "]<" + "br" + ">"
}

i want things to change so i wrote some bad code you’re welcome

Comments

Kevan: he/him

01-10-2018 07:44:28 UTC

against After the previous 95%-random dynasty, I’d rather not.

derrick: he/him

01-10-2018 14:57:15 UTC

for

If only because that code needs more functions. It will work better for replacing lines. rewriting the block each time something needs to be changed is a pain.

Trigon:

01-10-2018 16:04:43 UTC

I just realized i left a debugging function in there. Either way, I still want this to pass so for

9spaceking:

01-10-2018 18:18:13 UTC

against

Lulu: she/her

02-10-2018 02:23:18 UTC

for

Brendan: he/him

02-10-2018 19:49:41 UTC

imperial

card:

03-10-2018 00:18:36 UTC

imperial
Trigon, voting on your own proposal doesn’t change the number of votes