Check out Janggi (Korean Chess), our featured variant for December, 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

Interactive diagrams. (Updated!) Diagrams that interactively show piece moves.[All Comments] [Add Comment or Rating]
sirius628 wrote on Wed, Aug 30, 2017 03:50 AM UTC:

Hey, my diagram won't work. Could you help me? The code that I used is below. I am using my own uploaded images, just so you know.

<script type="text/javascript" src="../membergraphics/MSinteractive-diagrams/betza.js">
</script>
<div style="float:none;margin:0 40px 20px 0;">
  <div class="idiagram">
    files=12
    ranks=12
    royal=5
    castleFlip=1
    promoChoice=QCRGBN
    graphicsDir=../membergraphics/MSchess-and-a-half/
    whitePrefix=w
    blackPrefix=b
    graphicsType=gif
    squareSize=51
    lightShade=#DDDDDD
    darkShade=#B8B8B8
    startShade=#0000FF
    symmetry=mirror
    pawn:P:ifmnDifmnHifmR4fmWfceF:Pawn:a2-c2,e2-h2,j2-l2
    knight:N:NimpafN:Knight:b1,k1
    guard:G:WF:Guard:d2,i2
    cat:C:KADcafK:Cat:e1,h1
    king:K:KilO5isO4isO3isO2isO1isO0:King:g1
    queen:Q:QirO5isO4isO3isO2isO1isO0:Queen:f1
    nightrider:NN:NN:Nightrider:,
    centaur:X:WFN:Centaur:,
    star cat:S:KADGHcafKcafmpafKmpafcafK:StarCat:d1,i1
    kraken:∞:U:Kraken:,
    rook:R:R:Rook:a1,l1
    bishop:B:B:Bishop:c1,j1.
  </div>
</div>
<script>
  function WeirdPromotion(x1, y1, x2, y2, promo) {
    var typ = board[y1][x1], r = (typ & 1024 ? 0 : 11);
    if(y2 != r)  return promo;
    if((typ & 511) == 2) return 7;
    else if((typ & 511) == 3) return 8;
    else if((typ & 511) == 4) return 9;
    else if((typ & 511) == 5) return 10;
    else return promo;
  }
</script>