Several students use advanced enums instead of simple in the last task of shuffle, but that was not the objective. Example of usage with extends that has not been lectured:
enum Category(val englishName: String, val swedishName: String):
case RoyalFlush extends Category("royal flush", "royal flush")
case StraightFlush extends Category("straight flush", "färgstege" )
case Fours extends Category("four of a kind", "fyrtal" )
case FullHouse extends Category("full house", "kåk" )
case Flush extends Category("flush", "färg" )
case Straight extends Category("straight", "stege" )
case Threes extends Category("three of a kind", "tretal" )
case TwoPair extends Category("two pairs", "två par" )
case OnePair extends Category("pair", "par" )
case HighCard extends Category("high card", "högt kort" )
case None extends Category("nothing", "inget" )
This shoud be a simple enum instead and the naming logic should be kept in another singelton:
Several students use advanced enums instead of simple in the last task of shuffle, but that was not the objective. Example of usage with extends that has not been lectured:
This shoud be a simple enum instead and the naming logic should be kept in another singelton: