"; } include (ROOT . "/ads/adlocale.php"); $ad["shogi"] = "\n"; $ad["xiangqi"] = "\n"; $ad["play"] = "\n"; $ad["hexchessglinski"] = "\n"; function showad ($itemid, $type, $linkid) { global $ad, $bot, $mobile, $adlocale; if ($bot) return; $linkid = strtolower($linkid); if (($linkid == "chessrules") && (!empty($ad["chessbooks"]))) weightad ("chessbooks", 15); if (isset($ad[$itemid])) weightad ($itemid, 15); elseif (isset($ad[$linkid])) weightad($linkid, 10); if ($type == "Game") { $ad["fav"] = "\n"; weightad ("fav", 5); } else weightad ("play", 5); if (!empty($itemid) && ($type == "override")) $key = $itemid; else $key = array_rand($ad); // echo "
"; // print_r($ad); // echo $linkid; // echo "
"; if ($mobile) printf ("
"); else printf ("
"); echo $ad[$key]; echo "
\n"; } if (!$googleokay) { } elseif ($mobile) { $ad["google"] = << AD; weightad("google", 6); } else { /* $ad["google"] = << AD; */ $ad["google"] = << ADZ; } $adtype = ($mobile) ? "mobile" : "banner"; // include_once ROOT . "/ads/staunton-{$adtype}-ads.php"; if ($itemid != "HomepageofTheChe") { if ($adlocale) { include_once ROOT . "/ads/{$localename[$adlocale]}-{$adtype}-ads.php"; } elseif ($googleokay) weightad ("google", 5); } echo ""; ?> id = $row["ItemID"]; $this->text = get_field("LinkText", "IndexEntry", "ItemID", $this->id); if (empty($this->text)) $this->text = $row["Summary"]; /* if (fnmatch("*.php*", $this->url)) $this->type = "script"; elseif ((substr($this->url, -1) == "/") || (substr($this->url, -11) == "/index.html")) $this->type = "index"; else */ $this->type = $row["Type"]; $this->membersubmitted = $row["IsMemberSubmitted"]; $this->locked = $row["IsLocked"]; $this->featured = $row["IsPrimary"]; $this->url = make_link_url($row, true); /* if ($this->membersubmitted) $this->url = "/index/msdisplay.php?itemid={$this->id}"; elseif (($this->type == "Zillions") && fnmatch("*.zip", $row["URL"])) $this->url = "/index/zillions.php?itemid={$this->id}"; elseif (fnmatch("https://*", $row["URL"])) $this->url = "/index/external.php?itemid={$this->id}"; else $this->url = $row["URL"]; */ if ($this->type == "Jocly") $this->text .= " with Jocly"; elseif ($this->type == "Zillions") $this->text .= " with Zillions-of-Games"; elseif ($this->type == "Game") $this->text = "Rules of " . $this->text; elseif (($this->type == "PBM") && empty($row["IsLink"])) $this->text .= " on Game Courier"; } else { $this->id = $id; $this->url = $u; $this->text = $txt; $this->type = $typ; $this->membersubmitted = 0; $this->locked = 0; } $this->icon = get_icon($this->type, $this->membersubmitted, $this->locked); } public function __toString () { $icon = "icon}\" ALIGN=\"LEFT\" WIDTH=16 HEIGHT=16>"; if (strncmp($this->url, "http", 4) == 0) return sprintf ("
  • %s %s
  • \n", $icon, $this->url, $this->text); elseif (strncmp($this->url, "play/", 5) == 0) return sprintf ("
  • %s %s
  • \n", $icon, substr($this->url, 5), $this->text); else return sprintf ("
  • %s %s
  • \n", $icon, $this->url, $this->text); } } function linkcmp ($a, $b) { $cmp = strcmp($a->type, $b->type); if ($cmp == 0) $cmp = strnatcmp($a->text, $b->text); return $cmp; } function maxlen ($ra) { $len = 0; foreach ($ra as $link) { $len = max($len, strlen($link->text)); } return $len; } class personlink { public $personid; public $dispname; public $lastname; public $firstname; public function __construct ($u) { if (is_array($u)) { //should always be an array? $row = $u; $this->personid = $row["PersonID"]; $this->lastname = $row["LastName"]; $this->firstname= $row["FirstName"]; $this->dispname = $this->firstname . " " . $this->lastname; if ($this->dispname ==" ") { $this->dispname = $this->personid; } } } public function __toString () { $icon = sprintf (""); return sprintf ("
  • %s %s
  • \n", $icon, $this->personid, $this->dispname); } } function personlinkcmp ($a, $b) { $cmp = strcasecmp($a->lastname, $b->lastname); if ($cmp == 0) { $cmp = strcasecmp($a->firstname, $b->firstname); if ($cmp == 0) { $cmp = strcasecmp($a->dispname, $b->dispname); } } return $cmp; } function personmaxlen ($ra) { $len = 0; foreach ($ra as $link) { $len = max($len, strlen($link->dispname)); } return $len; } $prime = $second = $followers = $remote = $cat = $external = $favorites = $favedby = array(); if ($itemid) { if ($row = table_row("Item", "ItemID", $itemid)) { $type = $row["Type"]; $chessv = $row["Chessv"]; $categories = $row["Categories"]; $authorid = $row["AuthorID"]; $inventorid = $row["InventorID"]; $authorid2 = $row["AuthorID2"]; $inventorid2= $row["InventorID2"]; $linkid = $row["LinkItemID"]; $linkid2 = $row["LinkItemID2"]; $summary = $row["Summary"]; $featured = $row["IsPrimary"]; $membersubmitted = $row["IsMemberSubmitted"]; $locked = $row["IsLocked"]; if ($linkid != "") { $stmt = $dbh->prepare("SELECT * FROM Item WHERE LinkItemID=:group"); $stmt->bindValue(":group", $linkid); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["ItemID"] != $itemid) && empty($row["IsDeleted"]) && empty($row["IsHidden"]) && empty($row["IsBrokenLink"])) { if (is_external($row["URL"])) $external[] = new link ($row); else $prime[] = new link ($row); } } usort ($prime, "linkcmp"); } $stmt = $dbh->prepare("SELECT * FROM Item WHERE LinkItemID2=:group"); $stmt->bindValue(":group", $linkid); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["ItemID"] != $itemid) && empty($row["IsDeleted"]) && empty($row["IsHidden"]) && empty($row["IsBrokenLink"])) { if (is_external($row["URL"])) $external[] = new link ($row); else $followers[] = new link ($row); } } usort ($followers, "linkcmp"); } } if ($linkid2 != "") { $stmt = $dbh->prepare("SELECT * FROM Item WHERE LinkItemID=:group"); $stmt->bindValue(":group", $linkid2); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["ItemID"] != $itemid) && empty($row["IsDeleted"]) && empty($row["IsHidden"]) && empty($row["IsBrokenLink"])) { if (is_external($row["URL"])) $external[] = new link ($row); else $second[] = new link ($row); } } usort ($second, "linkcmp"); } $stmt = $dbh->prepare("SELECT * FROM Item WHERE LinkItemID2 = :group2 AND LinkItemID != :group"); $stmt->bindValue(":group", $linkid); $stmt->bindValue(":group2", $linkid2); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["ItemID"] != $itemid) && empty($row["IsDeleted"]) && empty($row["IsHidden"]) && empty($row["IsBrokenLink"])) { if (is_external($row["URL"])) $external[] = new link ($row); else $remote[] = new link ($row); } } usort ($remote, "linkcmp"); } } /* if ($inventorid != "") { $stmt = $dbh->prepare("SELECT * FROM Item WHERE InventorID=? OR InventorID2=? ORDER BY Summary"); if ($stmt->execute(array($inventorid, $inventorid))) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["IsDeleted"] == 0) && ($row["IsHidden"] == 0) && ($row["IsBrokenLink"] == 0) && ($row["Type"] == "Game") && ($row["ItemID"] != $itemid)) $inventions[] = new link ($row); } } // usort ($inventions, "linkcmp"); } if ($inventorid2 != "") { $stmt = $dbh->prepare("SELECT * FROM Item WHERE InventorID=? OR InventorID2=? ORDER BY Summary"); if ($stmt->execute(array($inventorid2, $inventorid2))) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { if (($row["IsDeleted"] == 0) && ($row["IsHidden"] == 0) && ($row["IsBrokenLink"] == 0) && ($row["Type"] == "Game") && ($row["ItemID"] != $itemid)) $inventions2[] = new link ($row); } } // usort ($inventions2, "linkcmp"); } */ if (!empty($categories)) { $catarray = explode(",", $categories); foreach ($catarray as $c) { $cat[] = new link ("index/mainquery.php?type=Any&category={$c}&orderby=LinkText&displayauthor=1&displayinventor=1", ucfirst($c), "script"); } } if (!empty($external)) usort ($external, "linkcmp"); } } else { $type = ""; } $fav = false; $stmt = $dbh->prepare("SELECT * FROM Item JOIN Favorites ON Item.ItemID = Favorites.ItemID WHERE Favorites.PersonID = :personid ORDER BY Summary"); $stmt->bindValue(":personid", $personid); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { // if (($row["IsDeleted"] == 0) && ($row["IsHidden"] == 0) && ($row["IsBrokenLink"] == 0) && ($row["Type"] == "Game")) $favorites[] = new link ($row); if ($itemid == $row["ItemID"]) $fav = true; } } $stmt = $dbh->prepare("SELECT * FROM Person JOIN Favorites ON Person.PersonID = Favorites.PersonID WHERE Favorites.ItemID = :itemid ORDER BY LastName"); $stmt->bindValue(":itemid", $itemid); if ($stmt->execute()) { while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { $favedby[] = new personlink ($row); } } ?>
    The Chess Variant Pages
    Custom Search
    if (window.canShowAds === undefined) document.writeln("

    Ad Blocker Detected! Please check out our Advertising policy for reasons to unblock this site, and please check out our affiliate links to Amazon and eBay in the Shop menu below.

    "); TXT; echo "
    "; } ?> "; if (!isset($itemid)) showad("","",""); elseif (!isset($type)) showad($itemid, "", ""); elseif (!isset($linkid)) showad($itemid, $type, ""); else showad($itemid, $type, $linkid); } ?>


    Custom Search
    %s. ", $inventorid, personid2name($inventorid)); elseif ((($authorid == $inventorid) || ($authorid == $inventorid2)) && empty($authorid2) && !empty($inventorid2)) $byline = sprintf ("This page is written by one of the game's inventor, %s. ", $authorid, personid2name($authorid)); elseif ((($authorid == $inventorid) || ($authorid == $inventorid2)) && (($authorid2 == $inventorid) || ($authorid2 == $inventorid2))) $byline = sprintf ("This page is written by both of the game's inventors, %s and %s. ", $inventorid, personid2name($inventorid), $inventorid2, personid2name($inventorid2)); if (is_favorite($inventorid, $itemid)) { if (!empty($inventorid2)) { if (is_favorite($inventorid2, $itemid)) $byline .= "This game is a favorite of both of its inventors."; else $byline .= sprintf("This game is a favorite of one of its inventors, %s.", $inventorid, personid2name($inventorid)); } else $byline .= "This game is a favorite of its inventor."; } if (!empty($byline)) echo "
    {$byline}


    "; } elseif (!empty($type) && ($type == "Piececlopedia")) printf ("

    The Piececlopedia is intended as a scholarly reference concerning the history and naming conventions of pieces used in Chess variants. But it is not a set of standards concerning what you must call pieces in newly invented games.
    "); } $itemid = $originalid; // Change back for scripts that use $itemid if (!empty($featured) && ($type == "Game")) echo "

    This is one of our Featured Games. Click the link to check out our others.

    \n"; $ruri = getenv("REQUEST_URI"); if ((fnmatch("*/erf/*", $ruri) || fnmatch("*/coffeecc/*", $ruri))): ?>

    Recent versions of Chrome, Firefox, and Edge do not support Java. Internet Explorer and Safari should still support it. Besides that, recent versions of Java will block this script unless you add https://www.chessvariants.com to your Java exceptions list. You should find this in the Security tab of your Java control panel.

    Asteryx: Sample Game

    Forgive the frailties and oversights of these feeble human testers, always various incarnations of myself. Any 'Zillionsofgames' wizards out there (I'm not one) are welcome to try to fit 'Asteryx' to 'Zillions' and generate rather better games. Contributions of any board-design gurus would be much appreciated too.

    In representing these games (the first final-format 'Asteryx' games ever played) I have probably gone overboard, giving start and end cells of each token every time, and making any capture absolutely explicit. This was really for my own benefit, bewildered as I was with the novelties of such an unfamiliar game, but hopefully it might also help any others who investigate this strange terrain to keep their bearings. More streamlined (though possibly less robust) representations can no doubt easily be developed.

    Game One:

    Asteryx multiple-capture variant:

    White: Narzos Scimitar Black: Torquil Faintheart

    1: e6 e8, f11 f7 x P e8.
    
    2: e4 e6 x P f7, e12 f9.
    
    3: b5 b7, g10 g8.
    
    4: h5 h7, d11 e8.
    
    5: f5 f7 x P g8, f9 g8 x P f7.
    
    6: g6 f7 x P g8, e10 g8 x P f7. 
    
    7: e6 f7 x P g8??, h11 g8 x P f7 (blind to capture of Q e2 with P e8). 
    
    8: h7 h11 x R i12, g8 h5 x R i4 (still blind).
    
    9: h11 i12 (Q), h5 i4 (Q). 
    
    10: Q i12 g6 (threatens both Qs), e8 e4 x Q e2 (at last, and thr mate).
    
    11: B f3 e6 x P e4, Q i4 g10 (escapes and thr mate).
    
    12: N c3 f5 (blocks), b11 b9.
    
    13: K e0 e2, B f13 f11. 
    
    14: c6 c8, Q e14 d9 x P c8.
    
    15: d5 d7 (thr Q d9 with N f5), c10 d6 x P d7 (but blindly neglects to take P b7 too). 
    
    At this point Black seems well ahead.
    
    16: B d3 c4 x P c6, c9 c8 (offers exchange of Rs). 
    
    17: b7 b11 x R a12, c8 b5 x R a4.
    
    18: B c3 c5 x P b5, B d13 c10 x P b11.
    
    19: K e2 f3 (safer), N c12 d7 (thr both Bs if only he realized it).
    
    20: B c6 b11 (thr N d7),N d7 c12 (ignominious retreat).
    
    21: B b11 d5, N c12 b7??.
    
    22: Q g6 d13 (thr mate),B f11 e14 (blocks).
    
    23: Q d13 e12 x B e14 (thr mate), c10b e14 (blocks and thr Q).
    
    24: Q e12 c12 (thr B), Q g10 e12 (blocks).
    
    25: B d5 e8 (offers exchange of Bs and thr Q d9), Q d9 d13 (thr Q).
    
    26: B e6 c10 (blocks), B e14 f11 (tries to develop).
    
    27: N g4 f9 (thr mate), K e16 e15.
    
    28: N f5 d9 (thr move to f13), K e15 f13 ??.
    
    29: N d9 e14! (thr both Qs), N g12 e16 x N e14.
    
    30: N f9 e14 x N e16 (same threat), Q d13 d5.
    
    31: Q c12 d11 x Q e12, B f11 e12 x N e14.
    
    White now finds himself slightly ahead. 
    
    32: B e8 f11 x B e12, Q d5 e10 x B f11.
    
    33: K f3 e4?, N b7 e8 (thr Q).
    
    34: Q d11 d5, N e8 f3 (thr mate).
    
    35: Q d5 e6 (blocks and thr N), N f3 g8 (retreats).
    
    36: K e4 f5?, Q e10 g6 (thr mate).
    
    37: K f5 f3 (retreats), K f13 f11.
    
    38: Q e6 e8, Q g6 f9 (thr Q).
    
    39: B c10 d9 (blocks), K f11 g10,
    
    40: K f3 f5?, Q f9 f7! (thr mate and Q).
    
    41: Q e8 e4 (blocks), Q f7 g6 (thr mate).
    
    42: Q e4 f3 (blocks), Q g6 e10 (thr B).
    
    43: B d9 e6 (retreats), K g10 f9?.
    
    44: Q f3 h7 (thr N), Q e10 e8?? (thinks to exchange N for B).
    
    45: B e6 f7 x N g8 (neither Q nor K can take B without mate), K f9 e10
    
    ( if 45...., K f9 g8 x B f7 then 46: K f5 f7 x K g8 - mate by capture)
    
    ( if 45...., Q e8 e6 x B f7 then 46: Q h7 e8 x Q e6 - bare king mate)
    
    46: K f5 e6, Q e8 d7??.
    
    47: B f7 e8 (thr mate and Q, and Q cannot block), Black resigns.
    

    See 'vishangroschessvariants' yahoo group for snapshots of this game.