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

Support for squares background colors and themes #13

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

Conversation

Rocche
Copy link

@Rocche Rocche commented Nov 8, 2023

Attempt to contribute to solve issue #11. The command supports a -t or --theme flag which specifies the path to a theme file. The command to run is:

go run . -t <path_to_theme_file>

If the application is built:

./gambit -t <path_to_theme_file>

In case a theme file is not provided, the board will be rendered as always without square colors.

A theme file has the following format:

WHITE=<color_of_white_pieces>
BLACK=<color_of_black_pieces>
LIGHTSQUARE=<color_of_light_squares>
DARKSQUARE=<color_of_dark_squares>
AVAILABLEMOVES=<color_of_available_move_dots>
SELECTEDPIECE=<color_of_selected_piece>
CHECK=<color_of_king_in_check>

There are two example files in the themes folder. You can find the relative screenshots below.

No theme Classic theme Ice theme
no_theme classic ice

@maaslalani
Copy link
Owner

Wow! This is quite awesome! Thank you so much! I'll take a look at this but great work, most likely the theme file format will change but everything looks quite good

@MaxWasTakenYT
Copy link

Merge when? It's been a whole year :*)

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.

3 participants