Skip to content

Commit edebaef

Browse files
authored
fix(curriculum): add examples in dice game step 14 (freeCodeCamp#56733)
1 parent 27e8bf9 commit edebaef

File tree

1 file changed

+1
-1
lines changed
  • curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game

1 file changed

+1
-1
lines changed

curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game/657e230500602983e01fff6e.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dashedName: step-14
77

88
# --description--
99

10-
For the last portion of the game, you will need to create an algorithm that checks for the presence of a straight. A small straight is when four of the dice have consecutive values in any order (`Ex. 1234`) resulting in a score of `30` points. A large straight is when all five dice have consecutive values in any order (`Ex. 12345`) resulting in a score of `40` points.
10+
For the last portion of the game, you will need to create an algorithm that checks for the presence of a straight. A small straight is when four of the dice have consecutive values in any order (Ex. in a roll of `41423`, we have `1234`) resulting in a score of `30` points. A large straight is when all five dice have consecutive values in any order (Ex. in a roll of `35124`, we have `12345`) resulting in a score of `40` points.
1111

1212
Declare a `checkForStraights` function which accepts an array of numbers. If the user gets a large straight, update the fifth radio button with a score of `40`. If the user gets a small straight, update the fourth radio button with a score of `30`. If the user gets no straight, update the last radio button to display `0`.
1313

0 commit comments

Comments
 (0)