Minor: remove hard-coded array length, simplify.
This commit is contained in:
parent
a37a1dc750
commit
18e7aa50ab
|
@ -118,7 +118,7 @@ var RoomNameGenerator = function(my) {
|
|||
*/
|
||||
function generateWord()
|
||||
{
|
||||
return words[( Math.round(((new Date().getTime() / 1000) +Math.random()*1000) % 1008))];
|
||||
return words[Math.floor(Math.random() * words.length)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue