Small cleanup

- extrait de méthode pour tirage dans un array
- utilisation des operateur ?: / ??
This commit is contained in:
Vincent Vandemeulebrouck
2021-02-12 01:11:03 +01:00
parent 9f2e17537d
commit 1cb4a7dbf5
7 changed files with 70 additions and 78 deletions

View File

@ -1,3 +1,4 @@
import { Misc } from "./misc.js"
const poesieHautReve = [
{
@ -64,7 +65,7 @@ const poesieHautReve = [
export class Poetique {
static getExtrait(){
return poesieHautReve[new Roll("1d" + poesieHautReve.length).evaluate().total - 1]
return Misc.rollOneOf(poesieHautReve);
}
}