Comments/Ratings for a Single Item
Hi Fergus,
I'm trying to get an unchequered board 8x10 and 8x12, but don't seem to find one.
I attempted to use the 8x8 plain ashtapada in the preset below, but that didn't work well:
http://play.chessvariants.com/pbm/play.php?game%3DSingle+Stone+Latrunculi+XXI%26settings%3DSet9
I made a new board copying and pasting the plain astapada board:
http://www.chessvariants.com/membergraphics/MSpetteia-latrunculi-xxi/Plain-Ashtapada-8x12.jpg
Can you please upload this board to the list of boards?
Thanks.
Jose
Thanks Fergus.
The new 8x12 Plain Ashtapada board solved my 8x12 needs, but had an expected result on my 8x10 presets:
http://play.chessvariants.com/pbm/play.php?game%3DPetteia+XXI%26settings%3DSet7
Somehow I thought the 8x12 board would have been cut down to 8x10.
Can you please also upload the 8x10 board to the list of boards?
http://www.chessvariants.com/membergraphics/MSpetteia-latrunculi-xxi/Plain-Ashtapada-8x10.jpg
Thanks.
Jose
Okay, I have added this. When you use an image that is larger than the area needed for the playing area, it uses the whole image and centers your playing area within the image. This allows your image to include decoration outside the playing area. For these uncheckered boards, the border around the board counts as a very minimal decoration.
Thanks again Fergus.
>> When you use an image that is larger than the area needed for the playing area, it uses the whole image and centers your playing area within the image.
I did not know that.
It offers opportunities to create some decoration around the boards.
I just added documentation for regmatch and filter. The former is in the binary operators section, and the latter is in the lambda function section. I also corrected documentation for the aggregate function.
I fixed the script for displaying fonts, and I updated or replaced some of the fonts that were missing. Some fonts went missing when I was forced to move to a VPS earlier this year, because I kept them outside of public_html, and I neglected to keep copies of them all.
Noticing that the % operator was giving a division by zero error, I modified the % and mod operators in GAME Code to return the first argument when the second argument is zero. Here is my reasoning for this. x % y = x - floor(x / y) * y. Since anything times zero is zero, the value of floor(x / y) does not affect the product of floor(x / y) * y when y is zero. So, even if x/y is undefined, the final product of floor(x / y) * y should still be zero when y is zero. When this is subtracted from x, the result is x.
@Fergus
Hello,
I did deleted the wrong logs. Could you tell me if and when will I be able to play?
I think I had asked that before, but I don't remember where nor I remember the answer :(!
Is there a way to control from the GC program the content of the caputred pieces box? Or the system just collects all pieces that have dissapeared. I ask that because for example in a centennial chess game I play against Anthony he has moved and reoriented his spearman and now his spearman (in straight orientation) appears captured although it is not the case :(!
Yes, use setsystem to set the value of capturedpieces. This is an associative array of captured pieces to display. The keys should be piece labels, and the values should be numbers of how many captured.
It looks like the documentation for copyfn had been incorrect. It had said the new name could go on the left. But like with copy, the new name goes on the right, and the name of what is being copied goes on the left. Since this is how I prefer it to work, I'm glad the mistake was in the documentation, not in the code for the command. That means I can correct the documentation without breaking any code.
@Fergus,
Hello!
In the chess2 include file what is the sub castlepos supposed to do?
It is used to evaluate possible castling moves without producing error messages. If you search for it, you will find it being used in the stalemated subroutine.
Fergus,
I have 3 things I'm needy about and can't do. These are not questions as if it would only be about some sideway task I could ask you and do it myself, but things to take a look if you have the time.
1. fast castle subroutine. Fast castle means castling in any place between rook and the king with the rook moving to the king's place. A pseudocode would be:
if the king and rook have not been moved
then if the destination field is empty
then if the king is not in check then move the king to destination, move the rook to source.
2. lyon movement code for chu shogi. Chu shogi is not that different of orthodox chess and it's implementation should be rather mundane. The only problem is the lyon. This seems to me over my current ability.
3.movement code for the joker (also, jester, fool, imitator). This piece imitates the last move of the opponent. For years I'm thinking about it, but just observing the it has to do something with the moved variable was not much from me. I need that for apothecary chess which is a mouth full anyway, so I'd really apreciate your help.
I was recently thinking about how to do a Chameleon piece with the new fairychess include file, though I haven't done anything yet. Here's what could work. Use a global variable to keep track of the last piece moved by the previous player. For example, put "set lastpiece $moved;" at the end of the Post-Move sections. Then define the piece like so:
def Joker fn const alias #lastpiece #0 #1; def Joker-Range fn join const alias #lastpiece "-Range" #0;If you're not using aliases for any pieces, you can omit the "alias" keyword. For earlier include files, the principle would be the same, but the code would be different.
I don't yet have a clear idea of what you mean by fast castling. Are the King and Rook just swapping places? If that's what's going on, Game Courier has a swap command that should prove useful.
I don't play Chu Shogi, but I'm aware that the Lion moves twice. I have programmed Marseillais Chess and Extra Move Chess, which both allow double moves more generally. These include the ability to prompt the player for a second move before completing that player's turn. While I have programmed double moves on the scale of a whole game, I have not done it for an individual piece. You might have to program the game in general to handle double moves by a single piece.
Actually, I have done this for Pawn promotions in Chess. So, you might be able to do it for the Lion more easily than I thought. You want to look into the continuemove command.
"Fast castling" isn't just the King and Rook changing places - the Rook goes to the King square but the King can go anywhere in between so long as it is not attacked. But squares in between can be attacked and need not even be empty.
This comes from Kevin Pacey's Waffle Chess. Here is his description:
A king that has never moved, and is not in check, can 'leap' once a game, along the first rank, to any unattacked empty square between it and an unmoved rook, followed by said rook 'leaping' to the king's initial square so as to complete castling in one single move. It does not matter if any squares in between are occupied or under attack.
The difficulty in programming fast castling is that a King might castle by moving just one space, and that needs to be distinguished by a regular King move. When this has come up in other games that allowed the King to castle by moving one space, the solution was to give that castling move to the Rook.
Thanks Fergus for the input and Greg for the clarification!....
Just an idea: some chess GUIs allow 'reverse' entry of moves, by first clicking the destination square, and then the piece that should go there. (Usually in combination with some 'auto-complete' mode, where the move is executed immediately if only a single piece could reach the clicked empty square, and pieces that you click move immediately if there is only one place they could go.)
If you would in general allow the origin and destination of a move to be swapped, the difference could in exceptional cases (such as fast castling) be given a special meaning. Such as the reverse order (empty square x King) would indicate the castling, and move the Rook as a side effect.
25 comments displayed
Permalink to the exact comments currently displayed.
Block scope is too embedded into the language to extract. My only real alternative is to write a new version of GAME Code and allow developers to choose which version they will use. I'm motivated to do this, because I don't like the piecemeal design of the language. This language grew by bits and pieces from what originally wasn't even a programming language, and it contains various artifacts from earlier ways of doing things and from earlier limits of PHP. Now that the language is more mature, and I have a clearer conception of how it is used, a rewrite could be in order. But before I rewrite it, I should create specifications for what it should do. But since it is a big project, I may put it on the backburner for a while.