7 ms·
A chess TUI implementation
- shric 3y agoLooks 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 3y agoThere 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.
- jph 3y agoGreat work! Thank you for sharing this.
- shmageggy 3y agoIt 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 3y agoBehold, DEC double-width mode: echo -e '\033#6♔♕♖♗♘♙♚♛♜♝♞♟' (best viewed in xterm)
- shmageggy 3y agoThis gets the correct aspect ratio but the glyphs (on my terminal) look stretched :(
- saulpw 3y agoYou can be clever and use half-blocks: ♘
- shmageggy 3y agoWhat's a half-block and how do I use one?
- saulpw 3y agoSorry, that didn't render. They're U+258C and U+2590. So you put them on either side and each square is rendered across 3 cells, and the 2 outer cells are half-blocks shared with the adjacent squares. https://en.wikipedia.org/wiki/Block_Elements https://en.wikipedia.org/wiki/Block_Elements
- shmerl 3y agoIs it using sixels?
- hnlmorg 3y agoJust standard character drawing blocks. Like how Teletext (if you remember that?) used to do graphics https://github.com/thomas-mauran/chess-tui/blob/592de110d15c55512f8254b38051e3a61853eb82/src/pieces/king.rs#L106 https://github.com/thomas-mauran/chess-tui/blob/592de110d15c...
- photonbeam 3y agoI 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
- lynx23 3y agoCommit 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 3y agoCould be the newline
- teleforce 3y agoHonest 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?
- __jonas 3y agolichess is open source and has an android app
- graphe 3y agoVouching for this, best chess app ever. Also offers a website!
- Zizizizz 3y agoFor convenience... https://lichess.org https://lichess.org https://play.google.com/store/apps/details?id=org.lichess.mobileapp https://play.google.com/store/apps/details?id=org.lichess.mo...
- teleforce 3y agoGreat, thanks for the suggestion. Apparently, Lichess has 'Over the board' feature that allows you to play with your friend offline, nice!
- jmfldn 3y agoWritten in Scala I believe which makes me love it even more (Scala fan here!).
- memming 3y agowhat's TUI? T for text?
- schaefer 3y agoTerminal (command line) User Interface Yes. Text
- dspillett 3y agoOr 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 https://en.wikipedia.org/wiki/Text-based_user_interface for more references.
- larsbrinkhoff 3y agoAn older chess TUI: https://github.com/PDP-10/its/issues/1024#issuecomment-400259292 https://github.com/PDP-10/its/issues/1024#issuecomment-40025...
- ziotom78 3y agoBorland 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!
- ligurio 3y agoSee other chess in text mode - https://github.com/ligurio/awesome-ttygames https://github.com/ligurio/awesome-ttygames
- qsort 3y agoVarious TUI modes were implemented in the ICS protocol for online chess. telnet freechess.org 5000 still works.
- FergusArgyll 3y agoThis 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)
- phone8675309 3y agoYou can use many compatible graphical interfaces. I remember using WinBoard (in Windows) or XBoard (in Linux) around 1998 or 1999 with to play chess on FICS after the novelty of the telnet experience wore off.
- mongol 3y agoLooks like my old C64 chess game
- magv 3y agoHey, I have my own chess with a textual UI which allows you to play against several beginner-level chess AI opponents: - Maia chess (https://maiachess.com https://maiachess.com), the human-like chess engine based on neural networks, - several of neural networks by Dietrich Kappe (https://github.com/dkappe/leela-chess-weights/releases https://github.com/dkappe/leela-chess-weights/releases), - and handicapped Stockfish (https://stockfishchess.org https://stockfishchess.org). The whole thing is at https://github.com/magv/bchess https://github.com/magv/bchess, and can be installed with just 'pip install bchess'.
- nilslindemann 3y agoWhat is a chess TUI, please? I play chess for decades but never heard of it.
- nilslindemann 3y agoOk, it seems to be a "text-based user interface", https://en.wikipedia.org/wiki/Text-based_user_interface https://en.wikipedia.org/wiki/Text-based_user_interface
- olzhas 3y agoI think you should not highlight all the possible moves.
- globular-toast 3y agoThis 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.
- shortrounddev2 3y agoIt's wild to me how many people writing native software opt to sandbox everything with docker these days
- mat_epice 3y agoIt’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.
- shortrounddev2 3y agoI don't think I've ever liked the experience of running Docker commands; I think its benefit is the sandboxed environment so the developer has fewer platform variables they need to worry about. I think flatpak is a more user friendly distribution mechanism. But, again, sandboxing really shouldn't be necessary with a Rust TUI application; there really shouldn't be much in the way of platform-specific code in there except maybe the ncurses library
- enlyth 3y agoAs 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
- somat 3y agoconversely, I am using OpenBSD, I see docker, I know that I am in for a long night untangling a docker file.
- tbm57 3y agothis is the most performant chess TUI implementation I've ever used