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

Add game-of-life exercise #795

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Add game-of-life exercise #795

merged 2 commits into from
Jan 22, 2025

Conversation

ErikSchierboom
Copy link
Member

No description provided.

Copy link
Member

@tasxatzial tasxatzial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splitting the tests into multiple lines seems kind of overkill to me. The matrices aren't really aligned so we may as well do something like

(is (= [[0 0 0]
        [0 0 0]
        [0 0 0]]
       (game-of-life/tick
         [[0 0 0]
          [0 1 0]
          [0 1 0]])))

One thing that bothers me a bit is that the canonical-data does not use standardized descriptions. It talks about matrices in two of the tests, and about cells in the rest of them. It should be talking about cells in all descriptions because a track might not even be using matrices for the cell representation.

exercises/practice/game-of-life/src/game_of_life.clj Outdated Show resolved Hide resolved
@ErikSchierboom
Copy link
Member Author

Updated.

@ErikSchierboom ErikSchierboom merged commit b6c3a04 into main Jan 22, 2025
2 checks passed
@ErikSchierboom ErikSchierboom deleted the game-of-life branch January 22, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants