Check out Modern Chess, our featured variant for January, 2025.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments by Thomas Marquardt

Earlier Reverse Order Later
Game Courier Developer's Guide. Learn how to design and program Chess variants for Game Courier.[All Comments] [Add Comment or Rating]
Thomas Marquardt wrote on Tue, Jan 27, 2009 01:37 PM UTC:
Hi, either I didn't get something, or I have found another bug.

I put the following code in the Pre-Game part:

set arr (x y);
sub test:
  local a2;
  set a2 ();
  for i var arr:  push a2 #i;  next;
  for i var a2:  echo #i;  next;
endsub;
gosub test;
gosub test;


I believe the output of this should be:

x
y
x
y

since test is called twice, and both times the content of arr is copied into a2 and then output. But the output is in fact:

x
y
x
y
x
y

In the second call of test, the old content of a2 is seemingly not deleted, and the 'x y' is appended to it.
If I make the variable a2 global (i.e. delete the line 'local a2;') then it works as it should.

Thomas Marquardt wrote on Fri, Jan 1, 2010 04:06 PM UTC:
Bug in the preset for Wildebeest Chess:

http://play.chessvariants.org/pbm/play.php?game%3DWildebeest+Chess%26settings%3DWildebeest+Chess+with+rules

Hi, I have written a preset for Wildebeest Chess some months ago. When I tested it (arount spring/summer of 2009) it seemed to work, but now it is no longer working. Before the first move it complained that the function definition of some function is wrong: the message was 'Function def requires more arguments than it has placeholders for.'. I fixed this by removing the function definitions, doing the calculation directly where the functions were previously called.

The function definition was:
def isKINGc == #2 K and == #0 f1  and match #1 a1 b1 c1 d1 h1 i1 j1 k1;

and it was called in post-move 1:
if fn isKINGc origin dest moved:
  ...


Now there is still another bug: when the rook castles onto the origin square of the king (entered as a rook's move, e.g. a1-f1) then the king dissapears.

I am sure that I had checked this after writing the preset and it worked, before Jeremy Good made the preset the official one (see the comments at http://www.chessvariants.com/large.dir/wildebeest.html).


-----------------------------------------------

Edit: I have found the bug and fixed it. I just forgot a ':' after the condition of an if-statement...

2 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.