mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): clarify counting cards decrease by 1 (#62072)
This commit is contained in:
@@ -23,7 +23,7 @@ Having more high cards remaining in the deck favors the player. When the count i
|
||||
1. The `cc` function should modify the global `count` variable based on certain criteria.
|
||||
1. The global `count` variable should be increased by `1` for the cards `2`, `3`,`4`, `5`, or `6`
|
||||
1. The global `count` variable should remain unchanged for the cards `7`, `8`, `9`.
|
||||
1. The global `count` variable should be decreased for the cards `10`, `"J"`, `"Q"`, `"K"`, `"A"`
|
||||
1. The global `count` variable should be decreased by `1` for the cards `10`, `"J"`, `"Q"`, `"K"`, `"A"`
|
||||
1. The `cc` function should return a string with current count and the string `Bet` if the count is positive.
|
||||
1. The `cc` function should return a string with current count and the string `Hold` if the count is less than or equal to `0`.
|
||||
1. In the function output, the current count and the player's decision (`Bet` or `Hold`) should be separated by a space. For example, `-3 Hold`.
|
||||
|
||||
Reference in New Issue
Block a user