google / blockly-games

Games for tomorrow's programmers.
https://blockly.games/
Apache License 2.0
1.29k stars 605 forks source link

Update algorithm for getting opponent ducks #162

Closed alschmiedt closed 4 years ago

alschmiedt commented 4 years ago

Get opponent ducks based on the following criteria:

  1. If the duck is published.
  2. If the duck is not the current users duck.
  3. If the duck is within the given range.

If not enough ducks are available at the first range increase the range until there are enough ducks or we are using the entire list.

** Leaving in some logging info since I think I will need them for when I work on dummy ducks.