Typescript all the parser things
This commit is contained in:
@@ -6,7 +6,7 @@ const inputProviderForTests: InputProvider = {
|
||||
* rollDice function returns the average roll for every dice rolled
|
||||
* [5d10, 1d4] => [[6,6,6,6,6], [3]]
|
||||
*/
|
||||
async rollDice(action, dice) {
|
||||
async rollDice(dice = []) {
|
||||
const result: number[][] = [];
|
||||
for (const diceRoll of dice) {
|
||||
const averageRoll = Math.round(diceRoll.diceSize / 2);
|
||||
@@ -21,7 +21,7 @@ const inputProviderForTests: InputProvider = {
|
||||
/**
|
||||
* For testing, always return the minimum number of choices, always choosing the first options
|
||||
*/
|
||||
async choose(action, choices, quantity = [1, 1]) {
|
||||
async choose(choices, quantity = [1, 1]) {
|
||||
const chosen: string[] = [];
|
||||
const choiceQuantity = quantity[0] <= 0 ? 1 : quantity[0];
|
||||
for (let i = 0; i < choiceQuantity && i < choices.length; i += 1) {
|
||||
|
||||
Reference in New Issue
Block a user