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

Valid but nonstandard codes #34

Open
wangyi041228 opened this issue Apr 5, 2020 · 5 comments
Open

Valid but nonstandard codes #34

wangyi041228 opened this issue Apr 5, 2020 · 5 comments

Comments

@wangyi041228
Copy link

Here'are two code:
CEBAGAICAIUTSBYBAQARWHA7EQ2DUAQCAEBAIOACAECCOKYBAIAQEMJX
CEBAGAICAIUTSBYBAQARWHA7EQ2DUAQCAECCOKYCAEBAIOABAIAQEMJX

The 2nd code doesn't meet the standard but LoR and all code sites support it. If you import the code in LoR then share it, the game generates the 2nd code, not the standard one.

@zofrex
Copy link
Contributor

zofrex commented Oct 30, 2020

As a library implementer I'm curious - what's non-standard about the second code? I see that the ordering of the set/faction lists within in the two copies list is different, but I don't understand why the first ordering is more correct than the second.

@Billzabob
Copy link
Contributor

@zofrex If you look at step 3 in the README it specifies an ordering:

The set/faction lists are ordered by increasing length. The contents of the set/faction lists are ordered alphanumerically.

@wangyi041228
Copy link
Author

As a library implementer I'm curious - what's non-standard about the second code? I see that the ordering of the set/faction lists within in the two copies list is different, but I don't understand why the first ordering is more correct than the second.

Since LoR game client doesn't make a imported deck standard, a SAME deck has more than 1 code at servers. Rioters might underestimate certian data of decks. As a player and analyst, I need to make every code standard before data processing.

@zofrex
Copy link
Contributor

zofrex commented Oct 30, 2020

@Billzabob I don't see an ordering specified for equal-length set/faction lists though?

The set/faction lists are ordered by increasing length

They are, here - the ones in different orders in each code are the same length.

The contents of the set/faction lists are ordered alphanumerically.

The contents of the set/faction lists are ordered exactly the same in both of the two codes given.

@wangyi041228 yes, you do need to normalise them for that. Maybe you could make a request that there should be a canonical ordering, but I think currently both codes you gave meet the standard. It's a rather under-specified standard (not a criticism, just an observation) so there's multiple ways to create codes that are, as far as I know, equally correct.

@Billzabob
Copy link
Contributor

@zofrex Oh I see what you mean. I can't remember but I believe I checked that at one point and they are ordered a specific way if the lengths are the same. You are correct that it's not documented though so it's ambiguous and different implementations probably do different things.

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

3 participants