The Chess Variant Pages




[ 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

Later Reverse Order EarlierEarliest
Home page of The Chess Variant Pages. Missing description[All Comments] [Add Comment or Rating]
Aurelian Florea wrote on 2021-11-28 UTC

Ok, thanks HG! Fergus if you can help?


H. G. Muller wrote on 2021-11-28 UTC

Well, like you said, there is nothing for me to see. The GAME code looks OK  as far as chanģing the piece set is concerned, and does work on the first ply. It was not changed between the first and second ply. This is a general Game Courier problem that only Fergus can shed light on.


Aurelian Florea wrote on 2021-11-28 UTC

@HG, Have you had time to take a look at my preset?


Albert Lee wrote on 2021-11-27 UTC

@Ben, thanks. It works now. I've posted a new chess variant already.


Aurelian Florea wrote on 2021-11-27 UTC

@HG The problem is that the piece pictures are not properly displayed. But I cannot see any bug as the end of the pregame section is the same to my two other presets that work fine. This is what I meant

@Daniel Do you see the same problem ?


H. G. Muller wrote on 2021-11-26 UTC

@HG, I don't see the problem.

I don't understand what problem you don't see. You wouldn't be posting this here if you did not see some problem.


Aurelian Florea wrote on 2021-11-26 UTC

@HG, I don't see the problem. To me it seems that this preset should work like the other 2!


Aurelian Florea wrote on 2021-11-25 UTC

It does not seem to be that as in play mode it works ok, HG. Also trouble begins with ply 2 which is quite weird!


H. G. Muller wrote on 2021-11-25 UTC

This is a preset where the piece images are redefined through assignment to the system variable $pieces, at the end of the Pre-Game section. Apparently the image displayed on the page is generated before this assignment is processed.


Aurelian Florea wrote on 2021-11-25 UTC

At the second move of a game of Apothecary Chess Alert the pieces are not shown properly. Any idea why?

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&log=catugo-arx-2021-327-838&userid=catugo


Aurelian Florea wrote on 2021-11-25 UTC

It works well now!


Fergus Duniho wrote on 2021-11-24 UTC

Pretty amazing that this did not appear to cause any problems in Play mode.

I ran a simple test in Solitaire mode, and it kept running the code for when the constant is not already set. I'll now look into why that is.


H. G. Muller wrote on 2021-11-24 UTC

OK, I changed the shuffle.txt file accordingly. Perhaps Aurelian can try whether the problem is now solved.

Pretty amazing that this did not appear to cause any problems in Play mode.


Fergus Duniho wrote on 2021-11-24 UTC

It looks like you are not retrieving the value of the constant properly. The line

setsystem space startshuffle;

should be either

setsystem space const startshuffle;

or

setsystem space @startshuffle;

H. G. Muller wrote on 2021-11-24 UTC

Yes, it is from the GAME code. But is seems the GAME code is right about this: Daniel says below that the initial position is all wrong, and indeed contains no royal.

This is a shuffle game, so it calls the general shuffle code in the Pre-Game section. This performs the shuffling, and stores the result in a constant. So that later invocations of the preset will use that same shuffle. A new shuffle is only made when the constant is not defined. This works fine in Play mode.

Can it be that the constant for remembering the initial position gets corrupted when an invitation is accepted?

For reference, below is the basic principle of the shuffling, by the routine ShuffleSetup called from the Pre-Game code:

sub ShuffleSetup:
  // performs the shuffles described in the above arrays
  if isconst startshuffle:        // shuffle has already been determined
    setsystem space startshuffle; // retrieve it
  else:                           // new game; must shuffle
    ... // shuffle the initial setup in $space
    setconst startshuffle $space;        // save the shuffle for persistent use
  endif;
endsub;

 


Fergus Duniho wrote on 2021-11-24 UTC

The games all say "White lost by absence of royalty!" and the board is filled with the same piece every time, which seems to always be whatever piece is labelled 's'

Since that error message is not from the PHP code, it must be from the GAME Code.


Fergus Duniho wrote on 2021-11-24 UTC

Doesn't the fact that the code work perfectly in Play mode prove that the problem is not in this code, then?

No, it doesn't. There are sometimes differences in how a game works in Solitaire or Play mode and how it works between two players.


Daniel Zacharias wrote on 2021-11-24 UTC

The games all say "White lost by absence of royalty!" and the board is filled with the same piece every time, which seems to always be whatever piece is labelled 's'


H. G. Muller wrote on 2021-11-23 UTC

Doesn't the fact that the code work perfectly in Play mode prove that the problem is not in this code, then?

I have no way to debug other code than what the one the user can provide. As far as I understand GC the only way that after accepting an invitation GC declares a loss would be when the GAME-code executes a resign command without getting any input. I am pretty sure my code doesn't do that. It definitely does not do that when you press Play in the preset menu. How does what happens when pressing Play differ from accepting an invitation?


Fergus Duniho wrote on 2021-11-23 UTC

These are all using code from H. G. Muller's code generator. So, he would be the one to ask about this unless the problem is more universal.


H. G. Muller wrote on 2021-11-23 UTC

Some additional info: the preset is automated through code generated by the Play-Test Applet, but in 'Play' mode this code appears to work fine. In particular there is no spurious declaration of game end by the Post-Game code sections. I don't know whether it is possible that the provided GAME-code would use a variable name that is also in use by Game Courier for other purposes, and confuses the system.


Aurelian Florea wrote on 2021-11-23 UTC

Good luck with the reading, Fergus. The trouble is that when I invite someone on any Grand Apothecary chess games, and that person accepts, the person in question receives a message that I won. So we can't play. Here are the presets in question:

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+1&settings=Applet

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+2&settings=Applet

https://www.chessvariants.com/play/pbm/play.php?game=Grand+Apothecary+Chess+3&settings=Applet


Fergus Duniho wrote on 2021-11-23 UTC

Fergus, Are you here?

Yes, I've been slacking. I'm also trying to catch up on my reading, as I am still ten books away from my reading goal of 52 books for the year, and I have less than six weeks to complete it.


Aurelian Florea wrote on 2021-11-22 UTC

Fergus, Are you here?


Ben Reiniger wrote on 2021-11-20 UTC

@Albert, if you are logged in, you should see your user id listed at the bottom of the Step 1 form. Do you? (Indeed, there is never an option to select the user id; it only ever pulls from the login session variable.)

It's also possible you got logged out somehow between starting the Step 1 page and submission? (If you are not logged in and you try to navigate to the submission form, it shouldn't populate, instead issuing an error block "You must be signed in...".)


25 comments displayed

Later Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.