Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: when 'filling in' remaining pokemons that user hasn't selected yet, make sure none of those pokemons have already been selected #13

Open
henrylin03 opened this issue Oct 21, 2024 · 0 comments

Comments

@henrylin03
Copy link
Owner

henrylin03 commented Oct 21, 2024

eg

  • imagine there are only 4 pokemons that need to be displayed at once (not 10), and we show maximum 1 pokemon that has been selected before (not 5)
  • if user selects pokemon A and B already, we need to fill in the two remaining pokemon spots
  • what should be displayed is "A", "c, d, e". "B" cannot be shown, otherwise it breaches our requirement that only max 1 pokemon that has been selected before can be shown (and vice versa if "B" is randomly selected to be shown, "A" cannot be shown as well)
  • however, at the moment, because the rest of the pokemon IDs are truly "random", then we might get the scenario where "A", "B", "c", "d" are shown, which is wrong and makes the game more difficult for the player than it needs to be

this likely just involves adding in a check in regeneratePokemonIds method in Gameboard component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant