mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-01-11 06:55:07 +00:00
110 lines
2.8 KiB
JavaScript
110 lines
2.8 KiB
JavaScript
Array.prototype.random = function () {
|
|
return this[Math.floor((Math.random()*this.length))];
|
|
};
|
|
|
|
var alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'];
|
|
var whitespace = ['.','~','#','!','$','+','-','+'];
|
|
var numbers = ['0','1','2','3','4','5','6','7','8','9'];
|
|
var left = ["Alabama",
|
|
"Alaska",
|
|
"Arizona",
|
|
"Arkansas",
|
|
"California",
|
|
"Colorado",
|
|
"Connecticut",
|
|
"Delaware",
|
|
"Florida",
|
|
"Georgia",
|
|
"Idaho",
|
|
"Illinois",
|
|
"Indiana",
|
|
"Iowa",
|
|
"Kansas",
|
|
"Kentucky",
|
|
"Louisiana",
|
|
"Maine",
|
|
"Maryland",
|
|
"Michigan",
|
|
"Minnesota",
|
|
"Missouri",
|
|
"Montana",
|
|
"Nebraska",
|
|
"Nevada",
|
|
"New Hampshire",
|
|
"New Jersey",
|
|
"New Mexico",
|
|
"New York",
|
|
"North Carolina",
|
|
"North Dakota",
|
|
"Ohio",
|
|
"Oklahoma",
|
|
"Oregon",
|
|
"Palau",
|
|
"Pennsylvania",
|
|
"Puerto Rico",
|
|
"Rhode Island",
|
|
"South Carolina",
|
|
"South Dakota",
|
|
"Tennessee",
|
|
"Texas",
|
|
"Utah",
|
|
"Vermont",
|
|
"Virgin Islands",
|
|
"Virginia",
|
|
"Washington",
|
|
"West Virginia",
|
|
"Wisconsin",
|
|
"Wyoming",
|
|
"Glasgow",
|
|
"Inverness",
|
|
"Edinburgh",
|
|
"Dumbarton",
|
|
"Balloch",
|
|
"Renton",
|
|
"Helensburgh",
|
|
"Cardross",
|
|
"Dundee",
|
|
"Aberdeen",
|
|
"Paisley",
|
|
"Hamilton",
|
|
"Greenock",
|
|
"Falkirk",
|
|
"Irvine",
|
|
"Clydebank",
|
|
"Renfrew",
|
|
"Barrhead",
|
|
"Erskine",
|
|
"London",
|
|
"Hammersmith",
|
|
"Islington"
|
|
|
|
];
|
|
|
|
var right = ['Aganju', 'Cygni', 'Akeron', 'Antares', 'Aragoth', 'Arduinne', 'Ardus', 'Aquitaine', 'Carpenter', 'Beta Hydri', 'Cooper', 'Dahin', 'Capella', 'Endriago', 'Gallina', 'Fenris', 'Freya', 'Glenn', 'Grissom', 'Tau Ceti', 'Jotunheim', 'Kailaasa', 'Lagarto', 'Muspelheim', 'Nifleheim', 'Odin Rex', 'Primus', 'Vega', 'Ragnarok', 'Shepard', 'Slayton', 'Tarsis', 'Mercury', 'Venus', 'Mars', 'Earth', 'Terra', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Pluto', 'Europa', 'Ganymede', 'Callisto', 'Titan', 'Juno', 'Eridanus', 'Cassiopeia', 'Scorpius', 'Crux', 'Cancer', 'Taurus', 'Lyra', 'Andromeda', 'Virgo', 'Aquarius', 'Cygnus', 'Corvus', 'Taurus', 'Draco', 'Perseus', 'Pegasus', 'Gemini', 'Columbia', 'Bootes', 'Orion', 'Deneb'];
|
|
|
|
var numberCluster = function() {
|
|
return numbers.random() + numbers.random() + numbers.random();
|
|
};
|
|
|
|
var randomAmount = function(i) {
|
|
var str='';
|
|
|
|
for (var t=0;t<i;t++) {
|
|
str = str + alpha.random();
|
|
}
|
|
|
|
return str;
|
|
};
|
|
|
|
var str = left.random() + ' ' + right.random() + ' ' + numberCluster() + ' ' + numberCluster() ;
|
|
|
|
str = str.split(' ').join(whitespace.random());
|
|
|
|
console.log(str);
|
|
|
|
str = randomAmount(10);
|
|
console.log(str);
|
|
|
|
|
|
|