romstad / Chess.jl

Julia chess programming library.
https://romstad.github.io/Chess.jl/dev/
Other
103 stars 17 forks source link

Unicode piece characters #1

Closed heliosdrm closed 4 years ago

heliosdrm commented 4 years ago

Wouldn't be nice to print the board with the Unicode characters for the corresponding pieces (at least in environments that support Unicode, like Atom, and REPL if not in Windows)?:

romstad commented 4 years ago

Thanks for the suggestion!

I actually had that at some point, but removed it for some reason. I don't remember why; I guess I didn't like the look of it. I'll consider reintroducing it, while making it optional.

There is still an undocumented tounicode(p::Piece) function, by the way.

romstad commented 4 years ago

I added an optional named parameter unicode (default false) to pprint(b::Board). It doesn't look good here, but I suppose it depends on your font and environment.