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 ]

Single Comment

Play Chess Variants with Jocly. Missing description[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Mon, Feb 19, 2024 03:33 PM UTC in reply to François Houdebert from 11:59 AM:

The version on hgm.nubati.net is the only one I updated. (Not entirely true; I updated the one on CVP for the new sprites. But it can take weeks before anyone will be able to enjoy updates on CVP, because they will all be redirected to CloudFlare, which caches the old files for an unpredictable amount of time.)

If you look at http://hgm.nubati.net/jocly/jocly-master/dist/browser/games/chessbase/tenjiku-chess-model.js you should see for GenerateMoves():

Model.Board.GenerateMoves=function(t){
 var e=this.cbGeneratePseudoLegalMoves(t),ok=0;
 this.mMoves=[];
 for(var r=!0,i=this.kings[this.mWho],a=e.length,n=0;n<a;n++){
  var s=e[n]
  if(this.kings[-this.mWho]==s.t){this.mMoves.push(s),this.mFinished=!0,this.mWinner=this.mWho;return;}else{
   if(ok)this.mMoves.push(s);else{
    var o=this.cbQuickApply(t,s);
    if(!(this.cbGetAttackers(t,this.kings[this.mWho],this.mWho,!0).length>0)){
     var h=this.cbGetAttackers(t,this.kings[-this.mWho],-this.mWho,!0).length>0;
     s.ck=h,this.mMoves.push(s),ok=1,s.f!=i&&(r=!1)
    }
    this.cbQuickUnapply(t,o)
   }
 }}
 if(0==this.mMoves.length){
  if(this.check===undefined)this.check=this.cbGetAttackers(t,this.kings[this.mWho],this.mWho,!0).length>0;
  this.mFinished=!0,this.mWinner=t.cbOnStaleMate?t.cbOnStaleMate*this.mWho:JocGame.DRAW,this.check&&(this.mWinner=-this.mWho);
 }else if(this.ending[this.mWho]){
  if(!r)for(var n=0;n<this.mMoves.length;n++)this.mMoves[n].ko=!1
 }else if(!this.ending[this.mWho]&&r&&!this.check) for(var n=0;n<this.mMoves.length;n++)this.mMoves[n].ko=!0
},

If not, you have an old version cached.