mattlaguardia / star-wars-lingo

A game of Star Wars trivia - Using Star Wars API
0 stars 0 forks source link

prevent characters coming up more than once during several plays #4

Open mnorelli opened 8 years ago

mnorelli commented 8 years ago

Is there a way that you might make the data coming back from the API seem to be more unique, so that the player doesn't get presented with the same name in the space of, say, five or ten plays? Like maybe, generate a random number, store it in an array, and when the next numbers are needed, check the new number against the set of old ones, and only use it call the API data if it is unique vis-a-vis the stored set? Or, especially if you wanted to make the game easier for Star Wars non-nerds, find twenty of the most familiar characters, get their number, stroe those in an array and randomize among them to send out the API call.

mnorelli commented 8 years ago

Loved this, Matt! Great use of the API and the slow reveal of letters!