implementing rummy rules in types