You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nick Efford edited this page Jun 13, 2024
·
6 revisions
Does CardCollection really need to be abstract? If it isn't, then users will be able to use CardCollection<Card> without necessarily needing to create a subclass; OTOH, creating a subclass allows a more meaningful class name to be used, improving code readability - and creation of an explicit named subclass can be avoided if need be:
val c =object:CardCollection<Card>() {}
Move vararg and string-based constructors up from BlackjackHand/PokerHand into CardCollection?