Comments by FergusDuniho
The website is still around. I bought my unlock key many years ago, and I'm not in any position to answer your question. You should contact Zillions-of-Games directly about this. Even if you can't get an unlock key, you may be able to buy a used version of the software on CD.
I'm not sure what is going on just yet. Since it wasn't programmed to display legal moves, I fixed that, and it now shows legal moves on White's first turn. After that, it stops for some reason I haven't discovered yet. In the meantime, you can move by typing in the notation for your move. All that's not working is the ability to move by pointing and clicking with the mouse or tapping on the screen.
This is now fixed. The movePiece JavaScript function had been trying to clear the markings on e2, which didn't exist, and that stopped it from continuing. Having it clear markings only on spaces that exist fixed the problem.
This is now fixed. The legal move it had found was the General taking the Chariot. I don't know why it allowed this. The code originally looked like this:
def G checkride #0 #1 1 0 and == var g #1 or checkleap #0 #1 0 1 and flag #1;
This code compared the value of g, which is where the other General was, to the destination.
I changed it to this, which compares the piece on the destination space to the label for the other General.
def G checkride #0 #1 1 0 and == space #1 g or checkleap #0 #1 0 1 and flag #1;
Game Courier does not check contributor status.
If you let me know what your account is, I'll look into this.
When this happens, manually add "&submit=Edit" to the end of the URL and reload the page.
Since another user claimed authorship of this page in the comments, I updated the author and inventor of this page. I don't know if there was another erik before you. If there was, there is no trace of activity before you joined. Even the page you mentioned has a start date that is later than you joined. I'm not sure why some comments are earlier than the start date for this page. It leaves me wondering if another page had the same ItemID but got deleted. However, the page itself says the game was invented in 2013. So, maybe there was just a screw-up in the information recorded about this page.
As I've programmed the game for Zillions-of-Games, promotion is possible only when a Pawn reaches the last rank by capturing a piece.
Please contain your emotional outbursts. While I normally enjoy fixing bugs, I'm less inclined to do so when someone makes a huge stink about one. So, for now, I'll just tell you how to work around it. Open another tab, log in to the site, then go back to the tab where your comment was seemingly lost and reload it.
Because the function is going to be used for both actual and potential moves, it has to be able to handle both. For a potential move, #0 will still be occupied, and #1 must be empty, but for an actual move, #0 will be empty, and the move must not be a capture. So, depending on the value of #0, you want to confirm either that #1 is empty or that the move is not a capture. The portion of your code devoted to this looks like this:
and nor capture nor empty #0 empty #1
First, "nor empty #0 empty #1" returns true if #0 and #1 are both false. This value is used as the second value for the next nor. So, "nor capture nor empty #0 empty #1" returns true if #0 and #1 are not both false and it is not a capture. This does not seem to be what you want, since it will always require a false value for capture. But this matters only when #0 is empty, and it could throw off the evaluation of a potential move.
It would be better to use this:
and cond empty #0 not capture empty #1
This returns "not capture" if #0 is empty or "empty #1" if #0 is not empty. The and requires this value to be true for it to continue. Note that this test has to be done only once. So your code can look like this:
checkleap #0 #1 3 0 or checkleap #0 #1 2 2 and cond empty #0 not capture empty #1 or checkleap #0 #1 2 1;
The former is a common rule in other games, but I don't know of any game where the latter is a rule.
The Bishop in Caissa Britannia had used this code:
def B checkleap #0 #1 1 0 and nor capture nor empty #0 empty #1 or checkride #0 #1 1 1;
Based on what I wrote earlier, this code is incorrect. In a test I ran, this code allowed the Bishop to make a non-capturing orthogonal move, but it did not display it among the available legal moves. So, it seems to be working for actual moves, but it is not working for potential moves. With that in mind, I have changed it to this:
def B checkleap #0 #1 1 0 and cond empty #0 not capture empty #1 or checkride #0 #1 1 1;
Running the same test, this code worked correctly for both potential and actual moves.
GAME Code uses prefix notation, not infix notation. This means the operator comes first. Where it looks like infix notation, the operator is actually working with only one operand. In particular, the logical operators can work with either one or two operands. This allows you to string them together as though you were using infix notation, but it doesn't work the same way as infix notation would.
For the present, you pass it along to an editor to upload it for you.
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.
3d_chess_war/default.php has its author recorded as the empty string. That isn't supposed to happen.
I changed the condition with isset($author) to !empty($author), which should now allow you to write to a pre-existing settings file whose author has been set to the empty string. Since the login() function can still return a true value when an empty string is passed to it as the userid, I added some lines of code to set $userid to the value of this function if it was previously empty. That should prevent anyone from saving a settings file with an empty $author string.
One part of the code said $SESSION instead of $_SESSION. That's now fixed.
The link to the script was missing from the Delete It button. I have now put it back.
Since you're already registered, you could try changing your email address instead of deleting your account and signing up for it again.
> I get the following error message: "This preset enforces the rules and displays legal moves." many, many times.
That's not an error message. But it is repeatedly printing "Please report any bugs or errors to Fergus Duniho", and that's a sign of an infinite loop. I don't know what could be causing it. When I don't know the cause of a bug, I will delete chunks of code until it goes away, then I will restore the code, narrow down to which code is causing the problem, and fix what's wrong.
> Also as a sidenote to Fergus the command you recomened me &submit=Edit works only with capital "E". Lowercase "e" issues an error involving something with not writting in English :(!
I know that. It's case sensitive.
While the message "Please report any bugs or errors to Fergus Duniho" is suitable for my own presets, it makes less sense to include it in presets written by others. Also, if you're going to try deleting code, make a copy of the complete code before you do this, and use cut instead of delete. You're not going to be able to rely on using undo like I do in a text editor.
25 comments displayed
Permalink to the exact comments currently displayed.
sign and - are two seperate operations. The - operator does subtraction. The sign operator indicates whether the result of the subtraction is positive, negative, or zero by returning 1, -1, or 0. In this context, this value is being used as a value for the where operator, which takes three arguments and returns a coordinate. It is the same coordinate each time. The space in question is the diagonal space it must pass through before turning to move in an orthogonal direction. By using sign twice, it has divided the board into four quadrants, and it has identified the only diagonally adjacent space it could have passed through to reach the space legal movement to is being checked for. If this space is empty, it then checks whether orthogonal movement from that space could reach the destination space.