From edebaeffc24850e500b7a98fe119e48e1d43bfca Mon Sep 17 00:00:00 2001 From: Kamal Singh <145190836+kamalxdev@users.noreply.github.com> Date: Sat, 19 Oct 2024 00:34:08 +0530 Subject: [PATCH] fix(curriculum): add examples in dice game step 14 (#56733) --- .../657e230500602983e01fff6e.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game/657e230500602983e01fff6e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game/657e230500602983e01fff6e.md index 60baf42db8b..78b0346686d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game/657e230500602983e01fff6e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/review-algorithmic-thinking-by-building-a-dice-game/657e230500602983e01fff6e.md @@ -7,7 +7,7 @@ dashedName: step-14 # --description-- -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. +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. 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`.