Ratings & Comments
@Fergus,
I still need to understand how to delete a value from an array in order to remove the necessary value from wcastle or bcastle.
I still need to understand how to delete a value from an array in order to remove the necessary value from wcastle or bcastle.
You can unset an array element if you know its key. For example:
set ra array a b c d e f g h i j k l m n o p q r;
unset ra.4; // removes e from array
But what if you just know the element you want to delete and not its key? I have now added a diff operator to return an array difference. When an argument isn't already an array, it gets turned into a single element array. So, this code removes j1 from wcastle.
set wcastle d1 c1 j1 k1;
set wcastle diff #wcastle j1;
With your piece of code I have tested my idea and made it work as intended. Thanks once again, Fergus!
![Editor](/index/editor.gif)
Charles Gilman called these Zephyr and Lama respectively, though by his description they cannot make the one‐step move that I'm not sure whether you're including. The latter also turns up as an Osprey in Expanded Chess
In wikipedia Fairy chess pieces they are the Osprey for DthenB and the Ostrich for AthenR
@Bn Em I meant a piece that takes the first 2 steps like a rook and then towards outside like a bishop. The osprey jumps as a dabbabah and then moves towards outside like a bishop. So they are not the same piece.
@Jean-louis
Agreed but these are not the pieces I am talking about. I'm saying a piece that starts like a rook for the first 2 steps and then it goes towards outside like a bishop. So this 2. Maticore would be able to stop or be blocked at wazir sqaures.
Unfortunately Erik has not logged in since May and I don't know how to contact him. Any ideas?
Hello Aurelian,
Sorry I didn't see that the last round has begun. It's true that my e-mail is not visible. I could have given it to you (or you could have asked me:) at the start of the tournament...
Sorry, I don't play long-term correspondence games anymore. So I resign for my last games and I give the victory to my opponent Daniel. Congratulations for all the participants, and for Aurelian for creating Apothecary Chess! The 3rd round games I play against Daniel were particularly intense from beginning to end.
I think I may have found an issue in Grand Cavalier Chess. In Self-play mode - 2 people on same PC. The Cavalier (Knight Pawn) is not able to get to the last rank for capture or promotion.
===
Question: according to the rules If you do not have any captured pieces the Cavalier can not promote. Can it go to the last rank for a capture and not promote if you have no captured pieces? ===
Can you check this?
Thank you.
Jim
Here is the relevant rule:
When there are no captured pieces a Cavalier may promote to, it may not move to the last rank, though it may still check the Eques Rex on the last rank.
Is there a violation of this rule?
@HG Muller
@Aurelian: Just out of curiosity: what happens when you use the Play-Test Applet to convert the Interactive Diagram you made to GAME code? Does the castling work as intended then?
I'm not sure I know how to do this. I have read this:
https://www.chessvariants.com/invention/game-code-generation
but I did not understood how to do the weird castling, or something that needs doing in game code like initial pawn pushes. (the * in Xbetza).
![Editor](/index/editor.gif)
You already made an Interactive Diagram that does the Pawn move and the castling in the way you want, right? All you have to do is paste the description of that diagram (without any HTML tags) into the Play-Test Applet, (where it says "paste an existing diagram"), and click the 'Game code' button.
![Editor](/index/editor.gif)
Ok so you are indeed including the 1‐step move among the movement possibilities — I suppose your ‘2.manticore’ is different enough from a lame/stepping/blockable osprey/lama (and mutatis mutandis for the ‘2.gryphon’) to merit a different name… maybe. If it's not being distinguished from a ‘true’ osprey/zephyr in a single game I'd be tempted to leave that name as is, though avoiding going too near overlexicalisation is a personal preference.
If the distinction does need to be made within a game (at which point the tradeoff changes imo), then ‘2.manticore’(/‘2.griffon’) is probably fine, if perhaps closer to the (presumably also present in a game featuring both of these) actual manticore/griffin than might be desirable, though I'm not really one to ask for original name suggestions (and M&B13 is apparently lacking names for lama/rook and zephyr/bishop compound with which we could (ab)use M&B8's ‘‐lander’ suffix). Perhaps a name based on lama/zephyr/osprey/ostrich/whatever you want to call them would be more apt? ‘Running Osprey’ isn't altogether without a ring to it…
The result of one of my 3 games is here :
https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet
although it seems I have done something wrong as I don't get normal results. It just says to report any bugs to you HG!
![Editor](/index/editor.gif)
1) It seems the checkbox "Do not include moves in code" is not ticked.
2) Something is wrong with the shuffling; I still have to figure out what. When I delete the last line of the Pre-Game code ("gosub ShuffleSetup;") the preset seems to work (but without shuffling, of course).
Hi Fergus, thank you for the reply. I think there is a violation to this rule. The following is an example: 1. H d3-c5 1... h g8-h6 2. I c1-g9 2... x f10-g9 3. H c5-d7 3... x g9-h9 4. H d7-f8 // - Check! - 4... x h9-i9 5. C j2-j3 5... q e10-e9 6 . H F8- Can not promote? ===== This was done in self-play mode. 2 people at the same PC. In move #6 I thought the Cavalier could pop-into the last rank, and promote to the night-rider it lost. ===
It's not so much that there is a bug here but that this preset was written before I gave Game Courier the ability to move pieces by clicking with the mouse. So, I did not program it to handle partial moves. As long as you enter the whole move at once, which will require some typing, it will allow the promotion. I will eventually get around to updating this preset or replacing it with a new one.
ok, great. Thank you.
HG, Have you took any time to take a look on the initial position randomization issue?
![Editor](/index/editor.gif)
@Fergus: I don't understand what is wrong with the following GAME code:
for (sqr, piece) $space: print . iter . #piece #sqr; if match #piece #toshuffle: if < * 2 file #sqr lastfile: // left half push left #sqr; endif; if & 1 + file #sqr rank #sqr: // distinguish by shade push dark #sqr; else: push light #sqr; endif; endif; next; print "got it";
I would have expected it to loop over the board. But instead it prints "iter0" and then exits. If I do a "printr $space" just before it, it does print the board as expected.
When I tried it by itself, it did loop through the board. Perhaps something in the outer context is affecting your code.
25 comments displayed
Permalink to the exact comments currently displayed.
No ideea I'll Try it!