Skip to content

Commit

Permalink
Added instruction for role-playing-game
Browse files Browse the repository at this point in the history
The last exercise does not state anything about the players health - but the tests does.
  • Loading branch information
YannickFricke authored and giacomocavalieri committed Nov 25, 2023
1 parent ac78792 commit 51e825d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions exercises/concept/role-playing-game/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ It returns the updated player, as well as the amount of damage that the cast spe
A successful spell cast does damage equal to two times the mana cost of the spell.
However, if the player has insufficient mana, nothing happens, the player is unchanged and no damage is done.
If the player does not even have a mana pool, attempting to cast the spell must decrease their health by the mana cost of the spell and does no damage.
Be aware that the players health cannot be below zero (0).

```gleam
let wizard = Player(name: None, level: 18, health: 123, mana: Some(30))
Expand Down

0 comments on commit 51e825d

Please sign in to comment.