tage64 / chess-cli

A repl to edit and analyse chess games.
GNU General Public License v3.0
1 stars 0 forks source link

Exploring the board. #7

Open GabrieleBattaglia opened 4 months ago

GabrieleBattaglia commented 4 months ago

It would be very helpful to help blind gamers, a set of commands to explore the board. Everything that follow a "." fullstop, should be considered an exploration command: .a reads column a ... .6 reads row 6 ... .f7 reads the state of f7 square... .@b8 Resume all the attack / defence / night's jump / pawn's captures on that suare .xc3 reads diagonals that include c3 square and their contained pieces eventually .P list the squares that contains white pawns .p list the squares that contains black pawns .r ...the same for black's rooks and so forth .mt resume the materials still on the board, comparing pieces per type

tage64 commented 4 months ago

This is interesting. It is similar to the commands used on Lichess where:

On one hand it would be good to be consistent with the Lichess notation. On the other hand, your notation is a bit shorter. Your notation however leads to an ambiguity: .b may both mean the b-line or black bishops.

I think that we should stick to a mix of the two:

GabrieleBattaglia commented 4 months ago

you already know I really like a very very short command because typing is time consuming and when you get familiar with a set of command, you could be super fast by having 1-char commands. And, if you still have aliases which are self explaining, there will be no problem for those users that like to have extended command.

Other my answers is here below, among lines.

...

This is interesting. It is similar to the commands used on Lichess where:

s a / scan a -- Speaks the content on the a-line.
s 2 -- Speaks the content on the second rank.

Yep, but we could do a better job replacing the s and the following space with a more smart comand like .a or .2

p r or p R -- Speaks the positions of the black or white rooks respectively.

Again, to me it would be much better .r and .R

On one hand it would be good to be consistent with the Lichess notation. On the other hand, your notation is a bit shorter. Your notation however leads to an ambiguity: .b may both mean the b-line or black bishops.

I think that we should stick to a mix of the two:

.s a/.scan aor.s 4` -- Scans the a-line or forth rank respectively.
.a or .5 -- Are shorthands for the above.
.p b or .p Q -- Tells the positions of the black bishops or white queens respectively.

yes, of course you're right and I'm sorry for my mistake.

So, I would keep the simple fullstop followed by rank or column, for the board, and another character like , (comma) to locate pieces per type like ,b for black bishops and ,B for white bishops.

.@b8 or .attacks b8 -- Tells the attacks on the b8 square by both players.

It's ok but I would rather choose a singol char as the prefix like @square (@f2) to keep it as short as possible. the long alias could be obviously attack f2. And yes, we could generate a smal report for both players that summarizes attacks and difences at that square.

s c3 or .scan c3 -- Scans the a1-h8 diagonal.

For the same reason to keep it short, also here I would choose a character that reminds diagonals like the xchar, or, maybe better a diagonal itself () or (/). So, xg5 will report the X diags: c1-h6 and h4-d8.

At a first glance you my find it a bit tricky but with some practice they will become a super familiar commands, fast and intuitive.

So we would have (,), (.) and () to scan various things over the board.

.m or .material -- Lists all pieces on the board.

More than this I would have thought to a report that summarizes the captured (or missing) materials.

Something like:

Material on the board 39/36)

White all, black 1 Bishop.

In this case white has all of its pieces and the black have lost a Bishop.

This would be super useful when you load a FEN position in order to study an exercise and you want to have a super fast report of the general situation on the board.

If you list all the material present, you may have a long list of pieces which are useless most of the cases, for instance when nobody has lost pieces yet.

I really hope you can find interesting my ideas to improve your beautiful piece of software.

Thanks for the implementation you've done.

Gabe.

GabrieleBattaglia commented 3 weeks ago

Hi. According to Chess-CLI command structure, you maybe like a command explore, shorted in ex which can be followed by a square, a raw, a column or a piece in order to have info on it. What do you think?

lucad1971 commented 3 weeks ago

Hello, I strongly support this issue request, having commandds to explore specific squares, rows/columns or single piece positions would be super usefull.. I would implement commands as possible similar to those used in lichess, to which people is used to. Ideally they should be as less verbose as possible...

Anyway thanks for developing this fantastic piece of software, which Gabriele made me know... Luca

tage64 commented 3 weeks ago

I should take a look when I get time. Thanks for using the program. In the meantime, you can use the board (or b) command to get a ASCII view of the board and a list of all pieces.

tage64 commented 2 weeks ago

In release v0.5.0, I have added commands to scan a file, rank or diagonal, as well as pieces of a certain type, or attackers of a specific square. See the relevant section in the manual, and post comments here if you have feedback. Otherwise, I will close this issue in a few days.

GabrieleBattaglia commented 2 weeks ago

Ciao Tage! Nice to hear that. I can't test it now because I'm away without the computer but I'll do it as soon I am back at home. All of my gratitude for your job.--Sent from starship Gabryphone 12ProMax    Captain Battaglia.Il giorno 19 ago 2024, alle ore 18:13, tage64 @.***> ha scritto: In release v0.5.0, I have added commands to scan a file, rank or diagonal, as well as pieces of a certain type, or attackers of a specific square. See the relevant section in the manual, and post comments here if you have feedback. Otherwise, I will close this issue in a few days.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

lucad1971 commented 2 weeks ago

Hello, I tested those new features and they seem to work as expected! Many thanks for the great job!

AVVISO DI RISERVATEZZA Informazioni riservate possono essere contenute nel messaggio o nei suoi allegati. Se non siete i destinatari indicati nel messaggio, o responsabili per la sua consegna alla persona, o se avete ricevuto il messaggio per errore, siete pregati di non trascriverlo, copiarlo o inviarlo ad alcuno. In tal caso vi invitiamo a cancellare il messaggio ed i suoi allegati. Grazie. CONFIDENTIALITY NOTICE Confidential information may be contained in this message or in its attachments. If you are not the addressee indicated in this message, or responsible for message delivering to that person, or if you have received this message in error, you may not transcribe, copy or deliver this message to anyone. In that case, you should delete this message and its attachments. Thank you.