display roles that are alive/dead

This commit is contained in:
Alec Maier
2020-04-11 18:53:05 -04:00
parent 49ab315566
commit 1df748bf9e
5 changed files with 119 additions and 28 deletions

View File

@@ -11,5 +11,13 @@ export const utility =
getRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
},
shuffle(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
};