ctm / mb2-doc

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

Dealer's Choice should be "Dealer's Choice", not "No-Limit Dealer's Choice" #1435

Closed ctm closed 1 month ago

ctm commented 1 month ago

Fix so that Dealer's Choice doesn't claim to be "No-Limit" since the betting structure is itself chosen by the dealer and could be pot or fixed limit.

Thank you, JP, for pointing this out!

ctm commented 1 month ago

This comes from GameGroup's implementation of Display:

impl Display for dyn GameGroup {
    fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
        write!(f, "{} {:#}", self.limit(), self.options())
    }
}

Currently it has no idea that the limit and separating space should be omitted for Dealer's Choice. I think the write thing to do is to make a trait function whose default is to do the above write! and then overwrite it in Choice. However, Dealer's Choice isn't the only game implemented by Choice, there's also Paradise Road Pick'em and WonkeyDonkey, so they should also use the same code that the default trait function will use, which means, I believe, having to put that code somewhere else since once we're in Choices implementation we no longer have access to the default implementation.

ctm commented 1 month ago

Fixed. Deploying now.