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

Using a sum type for pairings #392

Open
lakinwecker opened this issue Nov 1, 2021 · 0 comments
Open

Using a sum type for pairings #392

lakinwecker opened this issue Nov 1, 2021 · 0 comments

Comments

@lakinwecker
Copy link
Collaborator

https://github.com/Lichess4545/Chesster/blob/main/src/league.ts#L35-L45

I think we should consider making that into a sumtype of LonePlayerPairing and TeamPlayerPairing, TeamPlayerPairing can require the teams to be set, and we can provide typeguards. I think that would help us catch some of these issues sooner.

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