[ANN] chess puzzles on gemini

Adnan Maolood me at adnano.co
Wed Dec 2 21:13:56 GMT 2020


On Wed Dec 2, 2020 at 3:53 PM EST, Côme Chilliet wrote:
> Hello,
>
> After Tic Tac Toe, I worked on rendering a chess board in Unicode.
>
> I did not find a nice way to color black squares, but it works.
> Also, most gemini clients use dark themes and as a result inverse white
> and black colors on chess pieces.
>
> You can get a random chess puzzle on gemini://chess.lanterne.chilliet.eu
>
> The puzzle is taken from chess.com using their API. I looked into
> lichess API but did not find an endpoint for puzzles, and lichess
> returns PGN and my code was only supporting FEN.
> Note that the API does not give the solution, so you cannot know if you
> succeeded without using HTTP.
> But you can still use this page to work on your chess skills.
>
> The page is not interactive. Note that implementing an interactive chess
> board could be done by using an input field and Algebraic notation.
> But this would mean running a chess engine, and keep a server-side
> session, which I do not want to get into yet.
>
> Côme
>
> PS: and yes, it does mean I managed to use SNI to host several domain on
> the same server.

Looks cool!

You could use an approach similar to the one for Tic Tac Toe to avoid
having to keep track of server side state. There are only so many
possible combinations of chess pieces. You could encode the current
combination in a compact binary format and put that in the URL.
I might give it a try if I get a chance.


More information about the Gemini mailing list