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
- Player A only has number cards, so can never defend against a payment card.
47
-
- Player B has a long sequence of payment cards: Aces, Kings, Queens, and Jacks.
48
-
- Each payment card forces a payment, which Player A cannot counter with a payment card of their own, so Player B repeatedly wins the pile (repeatedly completes a trick).
49
-
- In the end, player B captures their opponent's entire deck by playing 40 cards in just 4 "tricks" (turns in which a deck is collected).
55
+
Player A: "45J2"
56
+
Player B: "J3"
57
+
Payment card configuration already viewed!
58
+
(status: "loop", cards: 8, tricks: 3)
59
+
```
50
60
51
61
## Your Task
52
62
53
63
- Parse the two players' decks from the input.
54
64
- Simulate the game following the rules above.
55
-
- Determine is the final game status is `"finished"` or `"loop"`.
65
+
- Determine the following information regarding the game:
56
66
-`"status"`: `"finished"` or `"loop"`
57
67
-`"cards"`: total number of cards played throughout the game
58
68
-`"tricks"`: number of times the central pile was collected
0 commit comments