ctm / mb2-doc

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

Level is a misleading name #1397

Closed ctm closed 5 months ago

ctm commented 5 months ago

Rename the enum Level to be Activity.

Level has two variants Play and Break. Yet when denoting levels by LevelNumber or just human terms (e.g., "Level 1"), only the Play variant is considered a level. I.e., breaks are not levels. So really, what we're currently calling a Level should be called something else, and Activity is the best fit that I can quickly think of.

FWIW, I've already done most of this as a spike, because I wanted to see if I could do it easily, and I can, although I haven't yet renamed fields and parameters that are called "level" and although I can search for level.*:.*\bActivity to find most instances, I'll probably overlook some. Oh well. I still think the rename will be a win.

ctm commented 5 months ago

Done. Deploying now. Unless I botched, this won't affect users at all, but it does change the keys in some of our json fields in the database. I don't like that, but if I'm going to make the change, it either makes sense to do it now and get it over with.