I am building a chess program on python. My board currently looks like this:
8 [r] [n] [b] [q] [k] [b] [n] [r]
7 [p] [p] [p] [p] [p] [p] [p] [p]
6 [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
5 [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
4 [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
3 [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
2 [P] [P] [P] [P] [P] [P] [P] [P]
1 [R] [N] [B] [Q] [K] [B] [N] [R]
# A B C D E F G H
This is the current conclusion, but I do not really like it. You cannot tell if the square is black or white, and using capital letters and lowercase letters for figures is also not so good. You guys maybe have an idea how to visualize the board without using third-party libraries?
I tried Unicode chess characters and coloring in the console, but this does not work on Windows.
print("\u2657")
>>> UnicodeEncodeError: 'charmap' codec can't encode character '\u2657' in position 0: character maps to <undefined>
source
share