diff --git a/lib/Results.js b/lib/Results.js index fc7a252..fafa54a 100644 --- a/lib/Results.js +++ b/lib/Results.js @@ -40,11 +40,19 @@ class Results { players = new Players(); bots = new Players(); - set players(num) { - this.players.setNum(num); + set players(val) { + if (typeof val === 'number') { + this.players.setNum(val); + } else if (Array.isArray(val)) { + this.players = val; + } } - set bots(num) { - this.bots.setNum(num); + set bots(val) { + if (typeof val === 'number') { + this.bots.setNum(val); + } else if (Array.isArray(val)) { + this.bots = val; + } } }