ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Structure sheets instead of structure templates for created tournaments #1439

Closed ctm closed 1 week ago

ctm commented 2 weeks ago

Add structure sheets and replace structure template links with structure sheet links.

Make it so that tournament/structure/N is a link to the structure sheet for tournament N and then use those links where we're currently linking to /tournament/template/.

ctm commented 2 weeks ago

I've been working on this since Thursday (the 13th, i.e. three days ago) morning and it's close to being done. Here's what remains to be done:

I will probably wind up spinning the "Do something with breaks…" check-box into its own issue, because I may want to refactor when I do it, since LevelRounds inherently don't include breaks. Additionally, breaks have names, but currently they're all named "Break", when they should be something like "The Break after Level Four". Right now non-synchronized breaks aren't used, so the only reason to do the extra break work on this issue would be if I finish up the other items so quickly that I can get the break work done in time for a deploy later today. That's conceivable, but not likely.

ctm commented 2 weeks ago

I'm deploying now, because what I have is much better than what's in place, but the structure sheet currently doesn't mention breaks at all and the template that is used when creating tournaments now shows the duration multipliers that aren't correct since we currently force all newly created tournaments to have the same round duration.

So, I'll probably tweak those things and deploy again, but I'm deploying now in case I get distracted or run out of time.

ctm commented 2 weeks ago

Yay. Now that we have dynamic structure sheets for event creation, I don't have to put a bunch of mealy-mouth wording in the structure template display code, because that code won't have any links to it, although curious people could still create the url by hand. I won't be removing the endpoint.

ctm commented 1 week ago

I've finished my work on non-unified level durations and am deploying that now. That leaves break information, which has a trivial portion and a tricky portion. The trivial portion is to identify when we're using synchronized breaks and say that we're using synchronized breaks (with a brief or detailed explanation).

Non-synchronized breaks will be a PITA to implement due to all the different ways we dump levels and our use of LevelRounds whose sole purpose is to have only level information and not break information. Oops. That was probably a bad choice.

Luckily, we pretty much only use synchronized breaks these days, so once that's done, structure sheets will display everything we currently use and almost everything else as well. That means additional break information is low priority, but I'll probably continue working on it today because the tricky issues are still fresh in my brain.

ctm commented 1 week ago

It took me a few hours to do the trivial portion, because it turns out min_break_mins was tracked differently than other attributes and as such, required a bit of jiggery-pokery to get to work dynamically. I do, however, have useful text for synchronized breaks, so I'm deploying now, even though Rust is warning me about dead code (that I'll use for the non-synchronized breaks).

ctm commented 1 week ago

We now summarize break durations and even calculate a table of breaks that can be passed into the code that writes out the levels, but we don't actually do the interspersing. I think it's just a matter of finding all the level iterators and have them return a Vec of either a single level or a vec of a break and a level and then using flatmap, but I think we have a ton of different level iterators and I also don't remember the semantics of column spanning, so it may take me a while.

So, I'm deploying now.

ctm commented 1 week ago

I had planned on knocking off the documentation changes and closing this issue, as a super quick thing to do this morning. However, there are a few other Players' Manual issues that are slightly more important, so I made a new High Priority issue to get them done (#1447) and I'm closing this now.