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

Make boards more consistent #137

Open
7 tasks
benjaminpjones opened this issue Jul 9, 2023 · 4 comments
Open
7 tasks

Make boards more consistent #137

benjaminpjones opened this issue Jul 9, 2023 · 4 comments

Comments

@benjaminpjones
Copy link
Collaborator

benjaminpjones commented Jul 9, 2023

Currently, there are 3-4 ways to make a standard looking Baduk board:

Screenshot 2023-07-09 at 1 47 55 PM

Some features are different by design:

  • graph vs grid
  • fractional stones
  • black and white vs color stones

But some features are mismatched for no good reason (I'm not sure this is a complete list, but this is everything I noticed):

  • last move marker
  • score markings
  • stone outlines
  • stone width
  • hover indicator
  • margin width
  • line weight

The task is to make the boards more consistent as the differences are quite obvious when they occur together on the game page. There may also be room for deduping the classes. BadukBoard may be implemented as a specialization of BadukBoardAbstract or MulticolorGridBoard, and FractionalBoard may be able to implement all four (although I am hesitant to replace grid-based boards with graph-based boards for performance reasons).

@merowin
Copy link
Collaborator

merowin commented Feb 15, 2024

How should the last move marker for Taengeuk Stones look?
I like this idea, maybe it could also work well here: https://forums.online-go.com/t/fractional-multicolour-go/36996/64
(though maybe with filled circles for markers instead of squares)

@benjaminpjones
Copy link
Collaborator Author

Yeah that's a tough one. The linked solution looks mostly good, but does it work for gray stones? Another solution might be something like:

if (colors are mostly light) {
    useBlackIndicator();
} else {
    useWhiteIndicator();
}

@JonKo314
Copy link
Collaborator

but does it work for gray stones?

For some gray stones it wouldn't work. A filter that does something like (channel + 64) mod 256 for each color channel (r, g or b) would be nice.

Another option would be to define an indicator color for each stone color. And maybe have users pick an indicator color if they are allowed to define the stone color freely.

@JonKo314
Copy link
Collaborator

Maybe that's what we want:
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-contrast

But it's an "experimental technology" and not supported by any major browser yet.

Apparently mix-blend-mode is also not supported yet "on SVG elements" for most mobile browser:
https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode#browser_compatibility

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

No branches or pull requests

3 participants