Minor: remove hard-coded array length, simplify.

This commit is contained in:
bgrozev 2014-09-03 20:40:47 +03:00
parent a37a1dc750
commit 18e7aa50ab
1 changed files with 1 additions and 1 deletions

View File

@ -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)];
}
/**