1 Year Ago
Refactor, creating CardPlayerDataBlackjack as a separate subclass of CardPlayerData, with a separate ProtoBuf message as well. Allows for more Blackjack-specific per-player content. This is mainly to support Split well, but helps Insurance as well. Originally I tried to do this in a bit of a nicer way with generics, casting PlayerData in CardGameController to the player data type of the subclass. But generics and MonoBehaviours really don't mix well. In the end there's just a bit of casting instead.