Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spellbound steel instructions #693

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions exercises/concept/spellbound-steel/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ SpellboundSteel.capitalize_cards(cards)
In the game is it important to calculate the power level of all cards.
The power for all cards can been seen in the following table:

| Card Type | Power Level |
| --------- | ----------- |
| Warrior | 10 |
| Mage | 20 |
| Rogue | 30 |
| Fireball | 15 |
| Ice Storm | 25 |
| Lightning Bolt | 35 |
| Card Type | Power Level |
|----------------|-------------|
| Warrior | 10 |
| Mage | 20 |
| Rogue | 30 |
| Fireball | 15 |
| Ice Storm | 25 |
| Lightning Bolt | 35 |
Comment on lines +42 to +49
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use a markdown formatter that makes makes tables easier to read in their raw format. I can revert this if we'd prefer to not have this change.


Implement a method `SpellboundSteel.calculate_power_level` that takes an `Array` of `String` cards and returns the total power level of all cards.

Expand All @@ -60,12 +60,12 @@ SpellboundSteel.calculate_power_level(cards)

In the game, there are what is known as cursed cards.
These cards is a hidden card that can only be decoded by the player who played it.
To decode the card you need to take every second character in the card name and reverse it.
To decode the card you need to take every second character in the card name and remove it.
That will give the name of the card.

Implement a method `SpellboundSteel.decode_card` that takes a `String` card and returns the decoded card.

```crystal
SpellboundSteel.decode_card("Wraoir")
SpellboundSteel.decode_card("Wbalrrrlimoqr")
# => "Warrior"
```
Loading