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

Repeating code blocks #15

Closed
Sup3Legacy opened this issue Aug 16, 2022 · 2 comments
Closed

Repeating code blocks #15

Sup3Legacy opened this issue Aug 16, 2022 · 2 comments

Comments

@Sup3Legacy
Copy link

Sup3Legacy commented Aug 16, 2022

When playing the game, I often encounter repeated code blocks, especially a lot of Javascript, e.g. a startgame function I get at least once per game, sometimes twice in a row. Is this intended?

Edit: I did input my GH token

@Lioness100
Copy link
Owner

Lioness100 commented Aug 16, 2022

I've also encountered this problem a bunch, ~8 hours ago I ran into the exact same startGame function a few times in a row too. My only theory right now is just unluckiness, but it could possibly be a bug. When the CLI gets code to show, it:

  1. Gets 100 gists from a random page (0-100 because that's the amount of pages of gists GitHub will display publicly) of the GitHub public gist API
  2. Gets a random gist from this vec every round, replenishing it if all 100 have already been used (unlikely)

A few things we could do is research another gist API that doesn't have the 100 page limit, or using the github repository API, which would provide near limitless amounts of code, except it would take twice the API calls. You can see an example of this here

@Lioness100
Copy link
Owner

Fixed by making the game fetch code from repos by default in 93fe9ac

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

2 participants