Check out Symmetric Chess, our featured variant for March, 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
Game Courier. PHP script for playing Chess variants online.[All Comments] [Add Comment or Rating]
Aurelian Florea wrote on Wed, Apr 29, 2020 07:53 AM UTC:

Fergus,

I had managed to solve the errors in question but still I have not managed to write a function for the king that castles free. It has to have the normal move once it has moved before, but only the three forward move otherwise. This is done because the first lateral move may be a regular move or a castling move and this ambiguity would be treated later with the ask command.


Aurelian Florea wrote on Tue, Apr 28, 2020 06:25 PM UTC:

I don't know then.

Have you had the time to look at the links with presets I had sent you?Once again:

https://www.chessvariants.com/play/pbm/play.php?game=Frog+Chess&settings=FastCastling

https://www.chessvariants.com/play/pbm/play.php?game=Hannibal+Chess&settings=FastCastling

https://www.chessvariants.com/play/pbm/play.php?game=Waffle+Chess&settings=FastCastling

The code at the bottom of the page is supposed to allow full king moves once the king has already moved but for the first move it should not be allowed to move sideways. Those moves are left aside because they can also be castling moves and this case needs treating separately.


🕸💡📝Fergus Duniho wrote on Tue, Apr 28, 2020 06:08 PM UTC:

I did nothing. It said you were the winner when I looked at it.


Aurelian Florea wrote on Tue, Apr 28, 2020 05:21 PM UTC:

I'm not sure about what you have done but now it is fixed.

Thank you!


🕸💡📝Fergus Duniho wrote on Tue, Apr 28, 2020 04:08 PM UTC:

In this case, it's different. The game was ended by a resignation, not the won command, and the log has one more move than the backup. It says that Armin, who played Black, resigned. It shows the first player resigning, but that is Black in Shogi. This is in line with what you have told me.


Aurelian Florea wrote on Tue, Apr 28, 2020 01:13 PM UTC:

I am having the same problem as Dax00. Armin has resing our chushogi game but he is now considered the winner.


🕸💡📝Fergus Duniho wrote on Mon, Apr 27, 2020 04:04 PM UTC:

I added a new default variable called $players. This gets set once when an invitation is accepted, and it keep the same value throughout the game. Its value is set to a space-separated string containing the userid of the first player to move followed by the userid of the second player to move. Since this value never changes, it can be used to determine which player actually moved first. This will affect only new games going forward, and so far, all it does is give me some data I can check when I examine a log. I have not changed Game Courier to make any use of it.


Aurelian Florea wrote on Mon, Apr 27, 2020 02:55 PM UTC:

From what I had understood reading fairychess again today is that I the regular king move does not worth much. the subs Castle, Castlepos and King need to be all changed inside my presets as they are otherwise incompatible with the regular way of castling. So back to work!


🕸💡📝Fergus Duniho wrote on Mon, Apr 27, 2020 12:43 PM UTC:

I tried replacing the text of the log with that of the backup in my text editor before saving it to the site. My SCP program complained that it couldn't replace the file. But it did update its time stamp, and when I checked again, it identified you as the winner.


🕸💡📝Fergus Duniho wrote on Mon, Apr 27, 2020 12:37 PM UTC:

For some reason, that didn't work out right, and it recreated the log file I had deleted.


🕸💡📝Fergus Duniho wrote on Mon, Apr 27, 2020 12:35 PM UTC:

Do you mean this game?

https://www.chessvariants.com/play/pbm/play.php?game=Chu+Shogi&log=dax00-cvgameroom-2020-107-344

This game says that sxg played Black, and Black, who moves first in Shogi, made the last move and entered the won command with it. By all indications, your opponent won, and this is correctly recorded. Since none of the comments were personally identifying, I could not tell from them who was who. However, I then compared the log with its backup, and very curiously, all that was different between them was that the opponent and player were switched. According to the backup, you won. Since no new moves were made after the backup, I have deleted the log and renamed the backup to be the log. I'm also going to have to rewrite Game Courier to keep better track of who is who. I cannot have it relying on just swapping player and opponent values.


🕸💡📝Fergus Duniho wrote on Mon, Apr 27, 2020 12:08 PM UTC:

> I have corrected that but I still get the same errors.

You forgot to assign constants for your Knights. So, when it finds a piece on b1, it has no name for it.


dax00 wrote on Mon, Apr 27, 2020 11:39 AM UTC:

I just won a game of chu shogi, but the system appears to have awarded the game to my opponent. Can someone fix this, please?

I played black the whole game, but on the final screen, it says I was white (??). If it's relevant at all, I sent my final move (with the "won" command) when the site was very laggy. There has been lots of lag recently.


Aurelian Florea wrote on Mon, Apr 27, 2020 04:19 AM UTC:

I have corrected that but I still get the same errors.


🕸💡📝Fergus Duniho wrote on Sun, Apr 26, 2020 07:20 PM UTC:

There shouldn't be any commas in the setflag command. The separator between values is the space.


Aurelian Florea wrote on Sun, Apr 26, 2020 05:16 PM UTC:

Sorry, I had forgotten about this. There we go:

https://www.chessvariants.com/play/pbm/play.php?game=Frog+Chess&settings=FastCastling&submit=Edit

And this one has a similar behaviour (everything besides the pregame section is copy paste out of the chess preset), but weirdly gives a different error:

https://www.chessvariants.com/play/pbm/play.php?game=Waffle+Chess&settings=FastCastling&submit=Edit


🕸💡📝Fergus Duniho wrote on Sun, Apr 26, 2020 05:07 PM UTC:

I'll have to see this in context to tell what is going on. Where are you using this code?


Aurelian Florea wrote on Sun, Apr 26, 2020 04:32 PM UTC:

I came up with the following. I still get the same error though at the line saying : for to fn join const alias #piece "-Range" #from which isThe function '-Range' has not been defined. Its arguments are b1

setflag f1,f8;
def Black_King cond flag f8 (checkaleap #0 #1 0 -1 or checkaleap #0 #1 -1 -1 or checkaleap #0 #1 1 -1) (checkleap #0 #1 1 0 or checkleap #0 #1 1 1);
def Black_King-Range merge leaps #0 1 0 leaps #0 1 1;
def White_King cond flag f1 (checkaleap #0 #1 0 1 or checkaleap #0 #1 -1 1 or checkaleap #0 #1 1 1) (checkleap #0 #1 1 0 or checkleap #0 #1 1 1);
def White_King-Range merge leaps #0 1 0 leaps #0 1 1;

alias King White_King;
alias King Black_King;


🕸💡📝Fergus Duniho wrote on Sun, Apr 26, 2020 03:52 PM UTC:

You don't have a proper expression following the cond operator. f1 and f8 are bare strings that will evaluate to true by virtue of being non-zero and non-empty. This means that cond will return the first value it gets after the condition. Also, cond expects three values, but you are passing it only two values. The or following the second expression passed to cond is a breaking or, which means that if the code has reached the cond, it has already discarded everything to the right of the second expression passed to cond. This means there is no third argument for cond.


Aurelian Florea wrote on Sun, Apr 26, 2020 03:43 PM UTC:

I am trying to write a preset that uses free castling.

1st step should be to write a king routine that does not allow king moving sideways (even though it is actually legal) because those moves can be either a regular move (rook stays in place) or a castling move (rook moves)

So far I came up with this

setflag f1,f8;
def Black_King cond f8 checkaleap #0 #1 0 -1 or checkaleap #0 #1 -1 -1 or checkaleap #0 #1 1 -1 checkleap #0 #1 1 0 or checkleap #0 #1 1 1;
def Black_King-Range merge leaps #0 1 0 leaps #0 1 1;
def White_King cond f1 checkaleap #0 #1 0 1 or checkaleap #0 #1 -1 1 or checkaleap #0 #1 1 1 checkleap #0 #1 1 0 or checkleap #0 #1 1 1;
def White_King-Range merge leaps #0 1 0 leaps #0 1 1;

alias King White_King;
alias King Black_King;

Unfortuneatly this gives the following error: The function '-Range' has not been defined. Its arguments are b1


🕸💡📝Fergus Duniho wrote on Sun, Apr 26, 2020 12:45 PM UTC:

Yes, the fairychess include file is the one to use now.


Aurelian Florea wrote on Sun, Apr 26, 2020 12:38 PM UTC:

@Fergus

Is the fairychess file ok, or fairychess-test is the current file to be included!


Greg Strong wrote on Wed, Apr 22, 2020 09:50 PM UTC:

Ok, the issue with saving a new Shako preset was that the file system permissions on the Shako sub-folder in pbmsettings weren't set correctly for some reason.  That has been corrected and I have a new preset, using the fairychess include file, that seems to work correctly and allows selection of different graphics:

/play/pbm/play.php?game%3DShako%26settings%3Dstandard

I will make a new GC launch page with a few different default themes.  I also want to put slightly better HTML rules in the preset itself.


Greg Strong wrote on Wed, Apr 22, 2020 06:16 PM UTC:

Yes, I said it backwards.

To answer your question, if you would like to submit updates to the Cazaux graphics, we can certainly update them.

I remember now why I made the East-West set group - it was for Shako Balbo.  When I was making the GC preset for it, I noticed the issue with Shako you reported but I didn't go back and make a new Shako preset.  I'll try to do that soon.


Jean-Louis Cazaux wrote on Wed, Apr 22, 2020 05:21 PM UTC:

Hello, the "Cazaux" graphics do have a Camel of course.

https://www.chessvariants.com/graphics.dir/cazaux/catalog.html

It is not because they didn't have a Camel that a Cannon was shown. No, it is because Shako needs a Cannon, not a Camel. The problem is when using Alfaerie set, it is a Camel that is shown, not a Cannon. 

 


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.