marcusbuffett / command-line-chess

A python program to play chess against an AI in the terminal.
MIT License
496 stars 156 forks source link

Replace termcolor with colored module #40

Closed GauthamBellamkonda closed 1 year ago

GauthamBellamkonda commented 1 year ago

Fixes #37

Add new option to the CLI for checkered board Use colored module for printing the board Update README

GauthamBellamkonda commented 1 year ago

Hey @ClasherKasten,

I'm not able to reproduce the second bug. Using chess -cu prints a complete board on my machine. I'm using the standard terminal on Ubuntu 20.04.

image

For the first bug, we could use full width unicode characters (they basically occupy twice the width of a normal character) to represent pieces on the board. I had to

It finally looks like this

image

Let me know if this is good enough, or if you have any better ideas/proposals.

ClasherKasten commented 1 year ago

I'm not able to reproduce the second bug. Using chess -cu prints a complete board on my machine. I'm using the standard terminal on Ubuntu 20.04.

Interestingly I couldn't reproduce it myself. Don't know what exactly this was, but let's say it's non-existing for now.

For the first bug, we could use full width unicode characters (they basically occupy twice the width of a normal character) to represent pieces on the board.

The whole idea of a separated unicode mode was to also let people play this when their terminal has no proper unicode support. So it wouldn't make any sense replacing the normal characters through unicode characters. I think it is almost impossible to achieve a good looking result without unicode characters.

The plan I have now in mind would be to remove the -u switch and fully convert the application to unicode only. I'll open a new issue for removing non-unicode mode.

But before I merge this, it would be nice to switch out the dependencies in the requirements.txt and setup.py files

And some small note on the side: I probably gonna merge #41 first because it is a way bigger change and I think if I would merge this PR first, it would eventually result in merge conflicts.

ClasherKasten commented 1 year ago

I felt so free to resolve the merge conflicts created by merging #43 and #41