Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercises(secret-handshake): overhaul to use enum #537

Merged
merged 9 commits into from
Oct 2, 2023

Commits on Sep 23, 2023

  1. exercises(secret-handshake): overhaul to use enum

    This exercise has always [1] required the user to return seq[string],
    but the scenario is better modelled with an enum.
    
    This commit is similar to previous overhauls for the allergies [2] and
    space-age [3] exercises.
    
    Closes: exercism#536
    
    [1] 8015636, 2019-02-24, "Adds secret-handshake exercise"
    [2] a8ab9c8, 2023-01-11, "exercises(allergies): overhaul to use enum"
    [3] b770d96, 2023-01-11, "exercises(space-age): overhaul to use enum"
    ee7 committed Sep 23, 2023
    Configuration menu
    Copy the full SHA
    07098a6 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2023

  1. Configuration menu
    Copy the full SHA
    2ca6e38 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9bc7a5 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. exercises(secret-handshake): example: use testBit

    Similar to previous discussions [1] I probably have a small preference
    for using shifts here, but it's fine either way.
    
    Note that bitops2 calls this `getBit` [2].
    
    [1] exercism#434 (comment)
    [2] https://github.com/status-im/nim-stew/blob/3159137d9a31/stew/bitops2.nim#L420-L424
    
    Suggested-by: ynfle
    ee7 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    85a6245 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0b582c View commit details
    Browse the repository at this point in the history
  3. exercises(secret-handshake): example: DRY enum vals

    This better supports adding new enum values, as long as those values
    aren't "special" like Reverse.
    ee7 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    e0a53ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eebf075 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0a08b71 View commit details
    Browse the repository at this point in the history
  6. exercises(secret-handshake): example: write result first

    For symmetry with the branch above.
    ee7 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    94fc7d3 View commit details
    Browse the repository at this point in the history