Check out Atomic Chess, our featured variant for November, 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

Vanguard Chess. Game on 16x16 board, with 48 pieces per player. (16x16, Cells: 256) [All Comments] [Add Comment or Rating]
💡📝Bob Greenwade wrote on Wed, Oct 4, 2023 03:29 PM UTC in reply to H. G. Muller from 09:26 AM:

OK, so currently Post-Move 1:

gosub HandleMove false;
set vic2 #victim;
if == H #mover:
  set p path #ori #desti;
  set k count #p;
  do while #k:
    dec k;
    set sqr elem #k #p;
    set v space #sqr;
    if isupper #v:
      break;
    endif;
    empty #sqr;
    if == K #v:
      set victim K;
    elsif == Q #v;
      set vic2 Q;
    endif;
  loop;
endif;
if == k #victim:
  set brd $space;
  set p search pr #brd;
  if #p:
    add k #p;
  endif;
endif;
if == q #vic2:
  set brd $space;
  set p search pc #brd;
  if #p:
    add q #p;
  endif;
endif;

And Post-Move 2:

gosub HandleMove true;
set vic2 #victim;
if == h #mover:
  set p path #ori #desti;
  set k count #p;
  do while #k:
    dec k;
    set sqr elem #k #p;
    set v space #sqr;
    if isupper #v:
      break;
    endif;
    empty #sqr;
    if == k #v:
      set victim k;
    elsif == q #v;
      set vic2 q;
    endif;
  loop;
endif;
if == K #victim:
  set brd $space;
  set p search PR #brd;
  if #p:
    add K #p;
  endif;
endif;
if == Q #vic2:
  set brd $space;
  set p search PC #brd;
  if #p:
    add Q #p;
  endif;
endif;

Hopefully I have all of the capitalizations and instruction order correct.

I do think I have something screwy in the Pre-Game, though; when I press the Run button, I get a text list of legal moves for White, one per line, before the board. The Pre-Game looks like this:

include /membergraphics/MSgame-code-generation/betza.txt;
set legdefs


(I'll skip the move definitions for now)

def P cond #0 1 0;
def p cond #0 22 0;
def N cond #0 43 0;
def n cond #0 43 0;
def B cond #0 144 0;
def b cond #0 144 0;
def R cond #0 165 0;
def r cond #0 165 0;
def Q cond #0 186 0;
def q cond #0 186 0;
def PC cond #0 227 0;
def pc cond #0 227 0;
def C cond #0 288 0;
def c cond #0 288 0;
def F cond #0 349 0;
def f cond #0 349 0;
def NR cond #0 470 0;
def nr cond #0 470 0;
def PR cond #0 511 0;
def pr cond #0 511 0;
def SL cond #0 572 0;
def sl cond #0 603 0;
def W cond #0 634 0;
def w cond #0 634 0;
def BR cond #0 931 0;
def br cond #0 931 0;
def A cond #0 1700 0;
def a cond #0 1700 0;
def BO cond #0 1793 0;
def bo cond #0 1793 0;
def L cond #0 2338 0;
def l cond #0 2338 0;
def H cond #0 2419 0;
def h cond #0 3997 0;
def GN cond #0 5575 0;
def gn cond #0 5575 0;
def SG cond #0 5616 0;
def sg cond #0 5616 0;
def SP cond #0 5642 0;
def sp cond #0 5642 0;
def K cond #0 5703 0;
def k cond #0 5703 0;

set wroyal (Pr K);
set broyal (pr k);
set morphers (P p SL sl SG sg);
set morphs assoc
  P ((All N))
  p ((All n))
  SL ((All H))
  sl ((All h))
  SG ((All L))
  sg ((All l))
;
set extinction 1; // must capture all royals to win
set promotables (P p Sl sl Sg sg); // pieces that can promote
set supply array; // in infinite supply
set promotab (         // allowed choices per rank
  (n l h)
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  0
  (N L H)
);

// Additional Pre-Game code (only needed with non-standard piece set):

set mypieces assoc
  P "wpawn.png" p "bpawn.png"
  N "wknight.png" n "bknight.png"
  B "wbishop.png" b "bbishop.png"
  R "wrook.png" r "brook.png"
  Q "wqueen.png" q "bqueen.png"
  PC "wfalcon.png" pc "bfalcon.png"
  C "wchancellor1.png" c "bchancellor1.png"
  F "wbird.png" f "bbird.png"
  NR "wnightrider.png" nr "bnightrider.png"
  PR "wduke.png" pr "bduke.png"
  SL "wchampion.png" sl "bchampion.png"
  W "wmoon.png" w "bmoon.png"
  BR "wman.png" br "bman.png"
  A "warcher.png" a "barcher.png"
  BO "wcannon.png" bo "bcannon.png"
  L "wlance.png" l "blance.png"
  H "wbenthero.png" h "bbenthero.png"
  GN "wgeneral.png" gn "bgeneral.png"
  SG "wsergeant.png" sg "bsergeant.png"
  SP "wthief.png" sp "bthief.png"
  K "wking.png" k "bking.png";
setsystem dir "/graphics.dir/alfaeriePNG/";
setsystem pieces #mypieces;

Once this is sorted, I can start in on the text, and probably working with you and/or Fergus on getting the graphics icons I created for this game into the preset.