top | item 38528595

A chess TUI implementation

115 points| kdheepak | 2 years ago |github.com

46 comments

order

qsort|2 years ago

Various TUI modes were implemented in the ICS protocol for online chess.

  telnet freechess.org 5000
still works.

FergusArgyll|2 years ago

This is the coolest thing ever! it's a bit hard to play because black/white is not so easy to distinguish but you probably get used to it. (I lost cause I mixed up my knight with my opponents)

teleforce|2 years ago

Honest question, is there any open source non-subscription based no-frill virtual chess board on Android that allows you to simply play chess offline against human or AI, in the same spirit as VLC on Android?

stavros|2 years ago

Lichess is fully open source and the best chess platform right now, online or offline.

__jonas|2 years ago

lichess is open source and has an android app

hereonout2|2 years ago

Not open source but chess.com app is brilliant, it's a freemium model - you can play for free - but they just keep trying to sell you tip and tutorials.

Also seems to have all the grand masters on there as players, Magnus ignored my request for a game though.

shric|2 years ago

Looks good! In case anyone else wonders (first thing I wanted to know), UCI (to talk to engines and online chess) is in the to-do, not yet implemented.

mtlmtlmtlmtl|2 years ago

There is a perfectly fine UCI crate available already, so it shouldn't take the author too too long. Unless they intend on implementing it themselves of course. But it's not a terribly complicated protocol either.

ziotom78|2 years ago

Borland Pascal 7 had a chess engine implementation in the EXAMPLES directory. There were two frontends in the same directory: one used OWL to provide a graphical interface in Windows, the other one was for MS-DOS (character-based) using the Turbo Vision library, and it was pretty awesome!

shmageggy|2 years ago

It has always bothered me that there are no Unicode code points for the left/right halves of chess pieces, which would enable a nearly square board using two characters per square.

This is a nice solution, but it makes for a rather big board.

colanderman|2 years ago

Behold, DEC double-width mode:

    echo -e '\033#6♔♕♖♗♘♙♚♛♜♝♞♟'
(best viewed in xterm)

saulpw|2 years ago

You can be clever and use half-blocks: ♘

shortrounddev2|2 years ago

It's wild to me how many people writing native software opt to sandbox everything with docker these days

enlyth|2 years ago

As a user I love it, I use a mix of Windows, Linux and MacOS machines and when I see docker I know that it will "just werk" regardless of which one I'm using at the moment

mat_epice|2 years ago

It’s just a distribution mechanism that users like. The page details other ways to install, including native methods. The container is at the top just because it will be the first thing many people will want to try.

lynx23|2 years ago

Commit 592de110d15c55512f8254b38051e3a61853eb82 looks weird. I don't have the time to read the code, but mod 9 instead of mod 8 in a chess-related program looks like the off-by-one has just been "fixed" in the wrong place.

a_t48|2 years ago

Could be the newline

photonbeam|2 years ago

I find when learning a language, reading the code for a problem that you already know the rules (or the shape of) really helps.

I think this is probably good project for simply reading the code to learn

jph|2 years ago

Great work! Thank you for sharing this.

olzhas|2 years ago

I think you should not highlight all the possible moves.

mongol|2 years ago

Looks like my old C64 chess game

memming|2 years ago

what's TUI? T for text?

dspillett|2 years ago

Or sometimes Terminal, I've seen them used interchangeably though I find “Text” is more common.

Usually TUI is used in a way that implies not just a basic command line interface: something like a GUI (buttons, dialogs, navigable lists, frames, interactive text editing, etc) just drawn using “text” elements so it works via a terminal console. I've seen some people refer to almost any CLI or REPL as a TUI but while they match the words of the acronym (they are user interfaces based on text) I think this is incorrect and TUI refers to a more specific sub-set of text-based interfaces.

See https://en.wikipedia.org/wiki/Text-based_user_interface for more references.

schaefer|2 years ago

Terminal (command line) User Interface

Yes. Text

tbm57|2 years ago

this is the most performant chess TUI implementation I've ever used

globular-toast|2 years ago

This is probably one of the most egregious "in rust" projects I've seen. Should I care about the performance improvements over something like Python in a program where I'm going to spend 99.999% of the time thinking? Should I be concerned about memory safety in other chess implementations written in C? The only thing Rust seems to add over Python or Go for things like this is making it harder to hack.