Created
June 10, 2017 16:48
-
-
Save rnice01/9dc90cff224a84c131e5906a08cc948c to your computer and use it in GitHub Desktop.
null created by rnice4christ - https://repl.it/If6V/9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
getRandomInt(max) { | |
var min = 0; | |
return Math.floor((Math.random() * (max - min))) + min; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let starwars = require('./starwars'); | |
console.log(starwars.Wookies.name()); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let wookie_names = require('./wookie_names.json'); | |
let getRandomInt = require('./generator_helper').getRandomInt; | |
module.exports = { | |
Wookies : { | |
name() { | |
var prefixes = wookie_names.prefixes; | |
var suffixes = wookie_names.suffixes; | |
return prefixes[getRandomInt(prefixes.length)] + suffixes[getRandomInt(suffixes.length)]; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"prefixes": [ | |
"Arri", | |
"Atti", | |
"Bus", | |
"Chal", | |
"Chew", | |
"Ciiir", | |
"Dew", | |
"Dry", | |
"Fro", | |
"Geyy", | |
"Gra", | |
"Groz", | |
"Issh", | |
"Ji", | |
"Jow", | |
"Kalla", | |
"Kat", | |
"Kerri", | |
"Kit", | |
"Liak", | |
"Lof", | |
"Low", | |
"Malla", | |
"Nag", | |
"Ralr", | |
"Ror", | |
"Sal", | |
"Shor", | |
"Sno", | |
"Spet", | |
"Tar", | |
"Wrrl" | |
], | |
"suffixes": [ | |
"addik", | |
"ahab", | |
"an", | |
"arra", | |
"bacca", | |
"bev", | |
"bow", | |
"chiir", | |
"chit", | |
"cuk", | |
"drrl", | |
"evge", | |
"kabukk", | |
"kazza", | |
"kkata", | |
"lanna", | |
"mapia", | |
"mum", | |
"nik", | |
"orral", | |
"ova", | |
"pirr", | |
"porin", | |
"ryyhn", | |
"tatha", | |
"tharr", | |
"tobuck", | |
"urra", | |
"warr", | |
"ykam" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment