Skip to content

Conversation

keiravillekode
Copy link
Contributor

closes #167

Copy link
Contributor

@atk atk left a comment

Choose a reason for hiding this comment

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

Please at least consider making the tests more maintainable even if you insist on keeping the input format.


## Input format

Each stone is represented in a single byte: 4 bits for each half.
Copy link
Contributor

Choose a reason for hiding this comment

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

According to Wikipedia, there are also extended domino sets that go up to 1-18, which would be more than can be represented in a nibble, even if you started at 0.

Wouldn't it make more sense to use 2xu8 for each stone?

});

xtest("singleton input = singleton output", () => {
expect(canChain("\x11")).toBe(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to have some automatic conversion so is is easier to read and maintain these tests.

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.

Add dominoes exercise
2 participants