thomas-mauran / chess-tui Goto Github PK
View Code? Open in Web Editor NEWA chess TUI implementation in rust 🦀
Home Page: https://crates.io/crates/chess-tui
License: MIT License
A chess TUI implementation in rust 🦀
Home Page: https://crates.io/crates/chess-tui
License: MIT License
It would be nice to go back and forward throughout history to look through the moves. This feature would go nicely with #25 to look through a game you have imported.
For first move, you can select a piece with not allowed move. This can be easily removed.
Update select_cell
method to add a control before executing any other conditions.
Sometimes enter
gets pressed accidentally, which is kind of annoying.
A character like backspace
could be assigned to takeback.
As far as I'm concerned lichess has a feature like this too, so it is useful when lichess integration is done.
Hey, this is a cool idea :)
I just wanted to point you to some unicode blocks that I've found that could be useful in making cool looking chess symbols:
Currently cargo fmt and clippy are not checked in the ci which is not very clean
add a job in the ci
Material difference is not shown.
Display material difference in History.
I guess Lichess has support for this too.
This would allow to play anonymously against online players.
Moves are in UCI style (e2-e4 / b1-c3). It would be nicer if these were in Algebraic style (e4 / Nc3) or perhaps an option for figurine style using https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode
3 fold repetition only checks moves in a row, it should check if the position repeats regardless of order
Play a game and repeat the position, outside of the same order
Draw in all repetition scenarios
OS: Linux (NixOS)
Terminal Emulator: Alacritty
This function just needs to be rewritten
pub fn draw_by_repetition(&self) -> bool {
if self.move_history.len() >= 9 {
let last_ten: Vec<PieceMove> =
self.move_history.iter().rev().take(9).cloned().collect();
if (last_ten[0].clone(), last_ten[1].clone())
== (last_ten[4].clone(), last_ten[5].clone())
&& last_ten[4].clone() == last_ten[8].clone()
&& (last_ten[2].clone(), last_ten[3].clone())
== (last_ten[6].clone(), last_ten[7].clone())
{
return true;
}
}
false
}
We only want to trigger this action when there is a new push on man
You have to manually select a square to move a piece, which is a bit tedious.
It would be good to be able to quickly use the keyboard for this (e.g a5 or Nc3).
I'm trying to run chess-tui bot game with gnuchess engine.
Created script engine.sh:
#!/bin/sh
gnuchess --uci
Gave it execution permissions by chmod +x engine.sh
.
Then run:
chess-tui -e /home/alex/script.sh
After selecting "Play against a bot", chess-tui just hangs.
Can you help me, please, what did I did wrong?
As for now, the config file (containing chess-engine path) seems to be stored under $HOME/.chess-tui
.
It would be a lot better to store it under $HOME/.config/chess-tui/chess-engine.toml
or something. The dirs crate fits the purpose to resolve this issue I think.
First try, I didn't know how to deselect the piece selected by mistake.
Add this following line into ui.rs
:
Line::from("ESCAPE : Deselect a piece or cancel a move"),
``
Be able to play as black
Implement it and be sure to remove all the hardcoded white values
For now the chess-tui config file in which there is the engine path for the bot is created directly at the root of the home directory. (~/.chess-tui)
Run chess-tui with -e option for the engine path and the configuration file will be created.
The configuration file should be located in a chess-tui directory in the .config directory as follow : ~/.config/chess-tui/config.toml
Also, it would be better if the configuration file is created whether or not there is an option on launch of chess-tui.
Be able to select a file to import as a new game position
the code could use & instead of clones for move_history
the boards automatically creates border for the cells to be the same size, but the borders aren´t looking great everytime
We could use cross term to get the color of the terminal and set in ui the border color to this background color
Tried to use the docker image, and see this error in the logs.
Are any volume mappings necessary for this to work ?
Am I correct to assume that I will be able to play the game via browser if the container is up and running ?
I dont see a mention of any ports, so I assume its port 80 by default ?
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Error: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
Error: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
Error: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
Error: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }
Implement a home menu when starting the game with the following options:
KeyEvents are reported twice Windows as Windows reports a KeyPress and a KeyRelease.
Therefore everything acts strangely, the app is unused.
You could try this app on Windows 10/11 or maybe anything else, but as it might be impossible, you could believe me.
Check whether a KeyEvent is a KeyPress and if not, ignore.
A question: Mouse support? Is it technically possible?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.