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

Outline shaded cells: autodetect exterior shade #489

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cryslith
Copy link
Contributor

Some people prefer to use yellow for the inside of the loop. This PR allows autodetecting this preference according via a cross mark on the exterior border.

slither
slither(1)

@vercel
Copy link

vercel bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pzprjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 11:56pm

@codecov-commenter
Copy link

Codecov Report

Patch coverage is 88.88% of modified lines.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Files Changed Coverage
src/variety/myopia.js ø
src/variety/slither.js ø
src/puzzle/Board.js 88.88%

📢 Thoughts on this report? Let us know!.

@x-sheep x-sheep added the enhancement New feature or request label Aug 30, 2023
Copy link
Collaborator

@x-sheep x-sheep left a comment

Choose a reason for hiding this comment

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

Overall this looks good. Before I can merge this, I'd like the test coverage to cover the other case as well (since this is a library function).

// A line is drawn between two shaded cells with opposite shades,
// or erased between shaded cells with the same shade.
// "Cells" outside the grid are treated as having shade 2,
// unless there is a cross mark between a shaded cell and the exterior, in which case that cell's shade is used as the exterior shade.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like this part of the comment to be rewritten. The exterior shade should be treated as the more common case, with the default value of 2 mentioned afterwards. Also, line 908 is currently too long. (we don't have strict lint rules for this, but it currently sticks out compared to the rest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants