Skip to content

Commit 6d7006d

Browse files
Sync the dnd-character exercise's docs with the latest data. (#2779)
1 parent f003c8e commit 6d7006d

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

exercises/practice/dnd-character/.docs/instructions.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
For a game of [Dungeons & Dragons][dnd], each player starts by generating a character they can play with.
44
This character has, among other things, six abilities; strength, dexterity, constitution, intelligence, wisdom and charisma.
55
These six abilities have scores that are determined randomly.
6-
You do this by rolling four 6-sided dice and record the sum of the largest three dice.
6+
You do this by rolling four 6-sided dice and recording the sum of the largest three dice.
77
You do this six times, once for each ability.
88

99
Your character's initial hitpoints are 10 + your character's constitution modifier.
1010
You find your character's constitution modifier by subtracting 10 from your character's constitution, divide by 2 and round down.
1111

12-
Write a random character generator that follows the rules above.
12+
Write a random character generator that follows the above rules.
1313

1414
For example, the six throws of four dice may look like:
1515

@@ -22,10 +22,11 @@ For example, the six throws of four dice may look like:
2222

2323
Because constitution is 3, the constitution modifier is -4 and the hitpoints are 6.
2424

25-
## Notes
26-
25+
~~~~exercism/note
2726
Most programming languages feature (pseudo-)random generators, but few programming languages are designed to roll dice.
2827
One such language is [Troll][troll].
2928
30-
[dnd]: https://en.wikipedia.org/wiki/Dungeons_%26_Dragons
3129
[troll]: https://di.ku.dk/Ansatte/?pure=da%2Fpublications%2Ftroll-a-language-for-specifying-dicerolls(84a45ff0-068b-11df-825d-000ea68e967b)%2Fexport.html
30+
~~~~
31+
32+
[dnd]: https://en.wikipedia.org/wiki/Dungeons_%26_Dragons
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Introduction
2+
3+
After weeks of anticipation, you and your friends get together for your very first game of [Dungeons & Dragons][dnd] (D&D).
4+
Since this is the first session of the game, each player has to generate a character to play with.
5+
The character's abilities are determined by rolling 6-sided dice, but where _are_ the dice?
6+
With a shock, you realize that your friends are waiting for _you_ to produce the dice; after all it was your idea to play D&D!
7+
Panicking, you realize you forgot to bring the dice, which would mean no D&D game.
8+
As you have some basic coding skills, you quickly come up with a solution: you'll write a program to simulate dice rolls.
9+
10+
[dnd]: https://en.wikipedia.org/wiki/Dungeons_%26_Dragons

0 commit comments

Comments
 (0)