Check out Grant Acedrex, our featured variant for April, 2024.


[ 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 ]

Single Comment

Modern Chess. Variant on a 9 by 9 board with piece that combines bishop and knight moves. (9x9, Cells: 81) [All Comments] [Add Comment or Rating]
Jose Carrillo wrote on Sat, Mar 22, 2008 03:34 PM UTC:
I'm working on the code for two new presets for Chess Courier for randomized variants for Modern Chess:

Modern Random Chess and Modern Fischer Random Chess

I'm trying to reuse some of the code already done for Fischer Random Chess, and found a statement that is too specific in the fischer.txt include file, that prevents this include file to be general enough to be used for 9x9 variants.

In the subroutine to evaluate actual moves by the Black Rook, in the elseif statement there is a reference to a physical coordinate (f8), rather than to a label (#roo):

sub r from to;
  set legal fn R #from #to;
  if not var legal or == old k:
    if == #to #rooo:
      castle #k #kooo #from #rooo;
      set k #kooo;
    elseif == #to f8:
      castle #k #koo #from #roo;
      set k #koo;
    endif;
  endif;
  unsetflag #from;
endsub;

The same is not the case for the subroutine for evaluating actual moves by the White Rook:

sub R from to;
  set legal fn R #from #to;
  if not var legal or == old K:
    if == #to #ROOO:
      castle #K #KOOO #from #ROOO;
      set K #KOOO;
    elseif == #to #ROO:
      castle #K #KOO #from #ROO;
      set K #KOO;
    endif;
  endif;
  unsetflag #from;
endsub;

Here the elseif has a #ROO label that allows this subroutine to be general enough to work for a 9x9 chess variant.

Can someone update the subroutine for black in fischer.txt to have the label #roo instead of f8?

Second question, how do I upload a new file into the include library?

I'm working on the code for a new modern-adjustment.txt file that will be general enough to provide for my new Bishop Adjustment in the randomized versions I'm working on, as well as for the Bishop Commuting found in the modern.txt include file.

Thanks.