kcapp / frontend

Dart Scoring application
17 stars 11 forks source link

Added choosing a starting score in practice #138

Closed lluni closed 1 year ago

lluni commented 1 year ago

Allow choosing a starting score (301, 501, 701) for a practice match.

These code changes assume that the BotConfig in the API has an additional value for the starting score, which isn't yet implemented. I don't feel sure about working with and migrating a database, so it would be good if someone else could take care of this. ~It currently also has kcapp-bot as a local directory in the package.json for development reasons. When releasing or https://github.com/kcapp/bot/pull/7 is merged, this should obviously be changed.~

thordy commented 1 year ago

Merged in changes and pushed to develop now, would be great if you could test and report back!

You will need API with at least commit 5e22d148d31b0bd09faf41e3e05b6369206171c0 and frontend 8173d5f13c9058bbaf9fc87fe95de153af5434b6. No changes required to database, since we already know the starting_score of a match, and didn't see any need to persist it in BotConfig.

I also added some basic handling if you attempt to start a match against a Mock Bot, and the player doesn't have any available legs to Mock. Hoping to improve this in the future, but should at least work for now!

@lluni Let me know how it goes for you. Feel free to also join kcapp on slack!