Closed ClasherKasten closed 1 year ago
Hello @ClasherKasten,
I have largely understood the issue, and would love to contribute to it.
Could you please elaborate what you meant by the second point?
- Options to set colors (Fixed set of colors / completely variable)
Do you want to give the users an option to customise colours (from the red-blue combination currently being used) in the terminal? Could you give a format of how the chess program should be run with such options?
Hey @GauthamBellamkonda,
first: cool that you are so interested in the project. :+1:
Yes, to begin with, a simple option would be to let the user customize the colors for black and white pieces and if they don't specify one, we could always fall back to the red-blue combination that exists right now. Some more advanced option could also be to let the user specify a background-color and/or a theme for the chess-board (this would require a kinda big change in the board rendering because we would need to render black and white tiles differently what the program doesn't do at the time).
Because we are talking about a CLI, i think the options should roughly look like this as an example:
chess --white="#123456" --black="#9abcde"
and if it accepts these long names for option, it probably should also support the short form:
chess -w "#123456" -b "#9abcde"
But these two are just my ideas, if you have an idea that you think looks better or provides a better user experience, feel free to contribute those instead.
If you have any further questions, feel free to ask.
Thanks for the response @ClasherKasten. Will start working on this. Can you assign this issue to me?
@ClasherKasten, what I have noticed is that termcolor supports only few standard colors and cannot take hex codes as an input. To give full flexibility of colors to the user, perhaps we should use a different python library which has support for hex codes. What do you say?
@ClasherKasten, what I have noticed is that termcolor supports only few standard colors and cannot take hex codes as an input.
By reviewing your PR I noticed that too.
To give full flexibility of colors to the user, perhaps we should use a different python library which has support for hex codes. What do you say?
Definitely, it would be a very good idea too look out for another library which could replace termcolor and provide more flexibility for the user.
Right now the CLI looks like this:
I think it would be a cool idea to switch to
argparse.ArgumentParser
which would make it more readable and easier to add new features to it. A few feature proposals:If you want to propose other new features you would like to see, please leave a comment or create an issue.