Closed ghost closed 2 years ago
You you got this one, Claire.
I'll work on it tonight!
No hurry, whenever you have time. If you're not sure where to place it, we can talk about it in that 10 min or whatever period tomorrow (tuesday) where we catch up.
Since each game will have a new and random opponent from an array of Opponent objects, we need a function that will select a random opponent.
calling the function with some
input
:selectRandomOpponents([{name: "Nighteyes"}, {name: "Simba"}])
// const randomValue = 1 // selectRandomOpponents()[1] == Simbareturn value (output): Simba
conclusion: opponent - Simba