Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Latest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

LatestLater Reverse Order EarlierEarliest
Devingt Chess. Decimal chess with 20 pieces per side including Sages (moving as Camels).[All Comments] [Add Comment or Rating]
📝Jean-Louis Cazaux wrote on Tue, Apr 5, 2022 07:56 PM UTC in reply to Fergus Duniho from 03:49 PM:

OK thanks. At last I understand. I'm not an IS expert, I can't get into all this. Too much things to learn, after 10 lines of reading of these long pages of tutorials, I'm lost. Every change I made is to understand that I have to change something else and I don't know where this will drive me. I give up, I can't spend more time on this, I am busy with other projects. Going back to my first demand, I prefer that this preset remains not accessible as it is an unfinished work.


🕸Fergus Duniho wrote on Tue, Apr 5, 2022 03:49 PM UTC in reply to Jean-Louis Cazaux from 12:13 PM:

The fairychess include file is not a drop-in replacement for chess2. It introduces new paradigms on how to program a preset. One major difference is in the names of functions and subroutines. Instead of naming them after piece labels, they are now named after piece codenames. The tutorial gives details on this. I would recommend starting with a preset that already works with the fairychess include file and adapting it to work with your game.


📝Jean-Louis Cazaux wrote on Tue, Apr 5, 2022 12:13 PM UTC in reply to Fergus Duniho from Mon Apr 4 09:49 PM:

Thanks I'm learning little by little. So much knowledge to absorb.

I have switched chess2 to fairychess but now I can't play at all.

I get:

Syntax Error on line 722

The function '' has not been defined. Its arguments are a10 e1

Line 722 is:

722 if fn const alias #piece #from var king

I don't understand what's wrong


🕸Fergus Duniho wrote on Mon, Apr 4, 2022 09:49 PM UTC in reply to Jean-Louis Cazaux from 07:27 PM:

Gross chess works fine for that. I can't see where is what I miss for Devingt.

You are using the chess2 include file instead of the fairychess include file. You should switch to the fairychess include file, because it is more up-to-date, and the new subroutines I mentioned to you are in that include file. To learn about what makes it different, you should check out the tutorial on the fairychess include file.


📝Jean-Louis Cazaux wrote on Mon, Apr 4, 2022 07:27 PM UTC in reply to Fergus Duniho from Sun Apr 3 08:38 PM:

Thank you for your help.

For en-passant, I had put already fps to 3. The pawn can advance 1, 2, 3 yes but the problem is en-passant. A pawn on 6 can take ep a pawn which advance 3 sq. Good. A pawn on 7 can take ep a pawn which advance 2 sq. Good. But a pawn on 7 cannot take ep a pawn which advance 3 sq.

Gross chess works fine for that. I can't see where is what I miss for Devingt.


🕸Fergus Duniho wrote on Sun, Apr 3, 2022 08:38 PM UTC in reply to Jean-Louis Cazaux from 04:38 PM:

en-passant: a pawn on 7 should be able to take en-passant an opposed pawn that had moved 3 sq.

This is handled in the preset for Gross Chess. The Pawn functions and subroutines in the fairychess include file should handle it automatically if you set fps to 3.

promotion: only for captured pieces, a pawn on 9 cannot step on 10 if no piece is available.

The preset for Eurasian Chess can handle this. In the Pre-Move sections, it sets a value for wprom or bprom that is based on the currently captured pieces. Each variable should be set to the pieces that a Pawn may promote to. These variables are static for Chess but dynamic for Eurasian Chess. When it is empty, a Pawn may not move to the last rank. Here's what it looks like for Pre-Move 1 for White:

set wprom intersection keys capturedpieces array Q R B N C V;

🕸Fergus Duniho wrote on Sun, Apr 3, 2022 07:58 PM UTC in reply to Jean-Louis Cazaux from 04:38 PM:

castling: the K may move 2 OR 3 sq towards the R

I just added some subroutines to the fairychess include file for this. These are castle2, castlepos2, and stalemated2, which are substitutes for castle, castlepos, and stalemated. Unlike castle and castlepos, castle2 and castlepos2 take four arguments instead of two. The first two are the same as before, the from and to coordinates for the King. These should be followed by the from and to coordinates for the piece the King is castling with. Unlike castle, which will handle all possible castling moves in the direction of the King's move, castle2 specifies a specific castling move. The stalemated2 subroutine differs from stalemated by calling castlepos2 and by writing out legal castling moves as two-piece moves.

The code in the preset also has to be changed to accommodate this. This line should be added in the Pre-Game code:

allow moves 2

You will also have to set different values for bcastle and wcastle. Instead of giving them a list of all the spaces a King may castle to, each should be given a list of fully described castling moves. Each should appear as four coordinates in parentheses in the same order they are fed into castle2. For your game, you would want to include four sets of coordinates for each King, one for each specific castling move.

In the Post-Move sections, castling moves have to be handled separately from regular moves. This means that the King subroutine should be rewritten to not include castling. An example of what to do can be seen in the preset for Miller's Spherical Chess, which uses the versions of these subroutines from the logical include file. The relevant code looks like this for White:

if isupper alias $prevmoved:
  if == $prevmoved K and == $moved R:
    if == $origin a1:
      gosub castle2 e1 c1 a1 d1;
    elseif == $origin h1:
      gosub castle2 e1 g1 h1 f1;
    else:
      die $moves "is illegal. Go back and try again.";
    endif;
  elseif != $prevmoved P or != $moved P or != $prevdest $dest:
    die "Except for castling or pawn promotion, you may not move twice on the same turn.";
  endif;
elseif ...

This uses the variable $prevmoved for the previous value of $moved. Usually, $prevmoved will have the piece last moved by the opponent. This block of code will run if the piece in $prevmoved belongs to the player moving, which happens in a two-part move. In Chess, these would be castling or pawn promotion. In a castling move, $prevmoved will have the player's own King. Using this variable saved me from having to write code like I did for multi-move variants. If it's not a castling move, it returns an error unless it is a pawn promotion. This lets the code exclude other double moves. Note that this code would have to be tweaked for your game.

Finally, the Post-Game code should use stalemated2 instead of stalemated.


H. G. Muller wrote on Sun, Apr 3, 2022 05:36 PM UTC in reply to Jean-Louis Cazaux from 04:38 PM:

The Play-Test Applet would have no problems to generate GAME code that handles the castling and the e.p. capture as desired, when the King's move is defined as KisO2isO3, and the Pawn's move as fmWfceFifmnDifmnH. The promote-to-captured can be requested by prefixing the pieces in the promoChoice string with a *. I am not completely sure whether it would then suppress the highlighting of a Pawn step to last rank if there is nothing to promote too, but in any case it would not accept such a move if the user selected it as destination.


📝Jean-Louis Cazaux wrote on Sun, Apr 3, 2022 04:38 PM UTC:

The page for Devingt Chess is OK.

But the preset GC for Devingt Chess is not OK. It should not be published as this. It is an unfinished work because I don't know how to code several rules:

  • castling: the K may move 2 OR 3 sq towards the R

  • en-passant: a pawn on 7 should be able to take en-passant an opposed pawn that had moved 3 sq.

  • promotion: only for captured pieces, a pawn on 9 cannot step on 10 if no piece is available.


📝Jean-Louis Cazaux wrote on Thu, Sep 23, 2021 08:54 PM UTC:

Could it be possible to release this page now? Thanks


10 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.