Eschecs, a simple GUI written in Pascal

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

mar wrote: Mon Nov 11, 2019 1:11 pm Very nice, thanks.
Would it be possible to also support castling (say in orthodox mode) by moving the king to the target position? KxR is fine, sure, but...
Thank you. OK, I will see what I can do.
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

mar wrote: Mon Nov 11, 2019 1:11 pmWould it be possible to also support castling (say in orthodox mode) by moving the king to the target position?
Done. I was afraid but in fact it was not so complicated. :)

Code: Select all

  if (FUserMove = 'e1g1') and FGame.IsLegal('e1h1') and FGame.IsCastling('e1h1') then FUserMove := 'e1h1';
  if (FUserMove = 'e1c1') and FGame.IsLegal('e1a1') and FGame.IsCastling('e1a1') then FUserMove := 'e1a1';
  if (FUserMove = 'e8g8') and FGame.IsLegal('e8h8') and FGame.IsCastling('e8h8') then FUserMove := 'e8h8';
  if (FUserMove = 'e8c8') and FGame.IsLegal('e8a8') and FGame.IsCastling('e8a8') then FUserMove := 'e8a8';
It will be possible to castle that way, even in FRC mode, but only with the traditional start position.

The modification will be available with the next binary release. Thank you for that good suggestion.
Qui trop embrasse mal étreint.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eschecs, a simple GUI written in Pascal

Post by mar »

Roland Chastain wrote: Mon Nov 11, 2019 2:07 pm Done. I was afraid but in fact it was not so complicated. :)

Code: Select all

  if (FUserMove = 'e1g1') and FGame.IsLegal('e1h1') and FGame.IsCastling('e1h1') then FUserMove := 'e1h1';
  if (FUserMove = 'e1c1') and FGame.IsLegal('e1a1') and FGame.IsCastling('e1a1') then FUserMove := 'e1a1';
  if (FUserMove = 'e8g8') and FGame.IsLegal('e8h8') and FGame.IsCastling('e8h8') then FUserMove := 'e8h8';
  if (FUserMove = 'e8c8') and FGame.IsLegal('e8a8') and FGame.IsCastling('e8a8') then FUserMove := 'e8a8';
It will be possible to castle that way, even in FRC mode, but only with the traditional start position.

The modification will be available with the next binary release. Thank you for that good suggestion.
:D
awesome, thanks.
Martin Sedlak
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Eschecs 5.0.0 beta

Post by Roland Chastain »

Hello!

There is another release candidate for Eschecs 5.0.0.

Testers are welcome. :wink:

Thank you.

Roland
Qui trop embrasse mal étreint.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eschecs 5.0.0 beta

Post by mar »

Very nice, the new castling mode feels more natural. May I have some more (small) feature requests?
1) allow piece sizes up to 100px?
2) would it be possible to move the options (except for language) from options.exe directly to the GUI so that no restart is required?
Martin Sedlak
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eschecs 5.0.0 beta

Post by mar »

Oh and a bug report: when I drag the piece outside the window and then drop it to board, the GUI crashes.
more info: pick a piece, drag it outside the app window and release the button. then move the mouse cursor back to the app and click
Martin Sedlak
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs 5.0.0 beta

Post by Roland Chastain »

mar wrote: Tue Nov 26, 2019 1:55 pm Very nice, the new castling mode feels more natural. May I have some more (small) feature requests?
1) allow piece sizes up to 100px?
2) would it be possible to move the options (except for language) from options.exe directly to the GUI so that no restart is required?
Thank you for your feedback and for your encouragements.

I uploaded 100 pixels pieces to the GitHub repository.

https://github.com/rchastain/eschecs

Please copy the images folder and paste it in Eschecs directory. It should work. :wink:

To move the options directly to the GUI is a good idea but not easy to do with the existing code. I promise to do it when I start a new version of the program.

Thank you for the bug report. As soon as I fix it I will release new binaries.

Regards.

Roland
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

@mar

If you have time (and desire), you could make a translation of the interface in your native language. :wink:

Please see language.pas.
Qui trop embrasse mal étreint.
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Eschecs, a simple GUI written in Pascal

Post by mar »

I've sent you a pull request
Martin Sedlak
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Eschecs, a simple GUI written in Pascal

Post by Roland Chastain »

Thank you very much Martin!
Qui trop embrasse mal étreint.