/ Uiua / 2023 / 07.ua
07.ua
 1  &fras ⊣ &args
 2  
 3  ParseCard  ← +2⊗⊙"23456789TJQKA"
 4  ParseHand  ← ⊂⊓(ParseCard°□|⋕)°⊟ ⊜□≠@ .
 5  CountCards ← ¤⬚0↯[4] ↘1 ⊏⍖. ⊕⧻⊛. ▽≠0.
 6  HandType ← -⊙6⊢⊚ ≡≍[
 7    0_0_0_0 1_0_0_0
 8    2_0_0_0 1_1_0_0
 9    2_1_0_0 1_1_1_0
10    1_1_1_1
11  ] CountCards
12  Sort          ← ⊏⍏ ≡(⊂HandType.↘¯1) .
13  ReplaceJokers ← ⍜(↘¯1)(×≠11.)
14  
15  ⊜ParseHand≠@\n.
16  ≡ReplaceJokers.
17  ∩(/+× +1⇡⧻. ⊣⍉ Sort)