Skip to content

Commit a2ae162

Browse files
committed
changed bullet list from * to - as reported in the guidelines
1 parent 3f09d79 commit a2ae162

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

exercises/camicia/instructions.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,19 @@ Your program will receive the initial configuration of two players’ decks and
55

66
## Rules
77

8-
* The deck is split between **two players**.
8+
- The deck is split between **two players**.
99
Each player's cards are represented as a string where the leftmost character is the top of the deck.
10-
11-
* Players take turns placing the **top card** of their deck onto a central pile.
12-
13-
* If the card is a **number card** (`-` in this scenario), play simply passes to the other player.
14-
15-
* If the card is a **payment card**, a price needs to be paid:
16-
17-
* `J` → opponent must pay 1 card
18-
* `Q` → opponent must pay 2 cards
19-
* `K` → opponent must pay 3 cards
20-
* `A` → opponent must pay 4 cards
21-
22-
* If the player paying a penalty reveals another payment card, that player stops paying the penalty and the other player much then pay the penalty.
23-
24-
* If the penalty is fully paid without interruption, the player who laid the **last payment card** collects the central pile and places it at the bottom of their deck.
10+
- Players take turns placing the **top card** of their deck onto a central pile.
11+
- If the card is a **number card** (`-` in this scenario), play simply passes to the other player.
12+
- If the card is a **payment card**, a price needs to be paid:
13+
- `J` → opponent must pay 1 card
14+
- `Q` → opponent must pay 2 cards
15+
- `K` → opponent must pay 3 cards
16+
- `A` → opponent must pay 4 cards
17+
- If the player paying a penalty reveals another payment card, that player stops paying the penalty and the other player much then pay the penalty.
18+
- If the penalty is fully paid without interruption, the player who laid the **last payment card** collects the central pile and places it at the bottom of their deck.
2519
That player then starts the next round.
26-
27-
* The game ends when one player has no more cards.
20+
- The game ends when one player has no more cards.
2821

2922
## Example
3023

@@ -44,17 +37,16 @@ Here’s a simple example of input and output.
4437

4538
### Explanation
4639

47-
* Player A only has number cards, so can never defend against a payment card.
48-
* Player B has a long sequence of payment cards: Aces, Kings, Queens, and Jacks.
49-
* 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).
50-
* 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).
40+
- Player A only has number cards, so can never defend against a payment card.
41+
- Player B has a long sequence of payment cards: Aces, Kings, Queens, and Jacks.
42+
- 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).
43+
- 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).
5144

5245
## Your Task
5346

54-
* Parse the two players' decks from the input.
55-
* Simulate the game following the rules above.
56-
* Determine is the final game status is `"finished"` or `"loop"`.
57-
58-
* `"status"`: `"finished"` or `"loop"`
59-
* `"cards"`: total number of cards played throughout the game
60-
* `"tricks"`: number of times the central pile was collected
47+
- Parse the two players' decks from the input.
48+
- Simulate the game following the rules above.
49+
- Determine is the final game status is `"finished"` or `"loop"`.
50+
- `"status"`: `"finished"` or `"loop"`
51+
- `"cards"`: total number of cards played throughout the game
52+
- `"tricks"`: number of times the central pile was collected

0 commit comments

Comments
 (0)