diff --git a/dist/browser/games/checkers/brazilian-draughts-hlwn-config.js b/dist/browser/games/checkers/brazilian-draughts-hlwn-config.js deleted file mode 100644 index 0e0f744..0000000 --- a/dist/browser/games/checkers/brazilian-draughts-hlwn-config.js +++ /dev/null @@ -1 +0,0 @@ -exports.config = {"status":true,"model":{"title-en":"Halloween Draughts","summary":"Same as international checkers on a 8x8 board.","thumbnail":"halloweenthumb.png","module":"checkers","maxLevel":20,"obsolete":true,"plazza":"broken","rules":"rules-brazilian-draughts.html","description":"description.html","credits":"credits.html","js":["checkersbase-model.js","draughts-model.js"],"gameOptions":{"preventRepeat":true,"width":4,"height":8,"initial":{"a":[[0,0],[0,1],[0,2],[0,3],[1,0],[1,1],[1,2],[1,3],[2,0],[2,1],[2,2],[2,3]],"b":[[7,0],[7,1],[7,2],[7,3],[6,0],[6,1],[6,2],[6,3],[5,0],[5,1],[5,2],[5,3]]},"variant":{"mustMoveForwardStrict":true,"lastRowCrown":true,"captureLongestLine":true,"lastRowFactor":0.001},"uctTransposition":"state"},"levels":[{"label":"Fast","ai":"uct","playoutDepth":0,"minVisitsExpand":1,"c":0.5,"maxDuration":1,"isDefault":true},{"label":"Beginner","ai":"uct","playoutDepth":0,"minVisitsExpand":1,"c":0.5,"maxDuration":0.5,"maxNodes":100,"maxLoops":200},{"label":"Easy","ai":"uct","playoutDepth":0,"minVisitsExpand":1,"c":0.5,"maxDuration":1,"maxNodes":2500,"maxLoops":500},{"label":"Medium","ai":"uct","playoutDepth":0,"minVisitsExpand":1,"c":0.5,"maxDuration":2,"maxNodes":5500,"maxLoops":500},{"label":"Hard","ai":"uct","playoutDepth":0,"minVisitsExpand":1,"c":0.5,"maxDuration":5,"maxNodes":2000,"maxLoops":3500},{"label":"Expert","maxLoops":8000,"c":0.8,"playoutDepth":0,"minVisitsExpand":1,"ai":"uct","uncertaintyFactor":5,"propagateMultiVisits":false,"maxDuration":60,"maxNodes":15000,"ignoreLeaf":false}]},"view":{"title-en":"Draughts View","preferredRatio":1,"js":["checkersbase-view.js","draughts-view.js"],"skins":[{"name":"halloween","title":"Halloween"}],"visuals":{"600x600":["res/visuals/halloween-draughts-600x600-2d.jpg","res/visuals/halloween-draughts-b-600x600-2d.jpg"]},"module":"checkers","css":["checkersbase.css","draughts.css"],"switchable":true,"animateSelfMoves":false,"useNotation":true,"useShowMoves":true,"defaultOptions":{"sounds":true,"notation":false,"moves":true},"preloadImages":{"pieces":"res/images/pieces.png"}}} \ No newline at end of file diff --git a/dist/browser/games/checkers/brazilian-draughts-hlwn-model.js b/dist/browser/games/checkers/brazilian-draughts-hlwn-model.js deleted file mode 100644 index d4ef19a..0000000 --- a/dist/browser/games/checkers/brazilian-draughts-hlwn-model.js +++ /dev/null @@ -1 +0,0 @@ -exports.model=Model={Game:{},Board:{},Move:{}},function(){function t(t){if(o){var e=t%s;return(t-e)/s*s+s-e}var n=s*i-t-1,r=n%s;return n-r+s-r}var s,i,o=!1;Model.Game.checkersPosToString=t,Model.Game.InitGameInfo=function(){},Model.Game.BuildGraphCoord=function(){var t=(this.mOptions.width,this.mOptions.height,[]),s=[];this.g.Graph=t,this.g.Coord=s},Model.Game.InitGame=function(){var t=this.mOptions.width,e=this.mOptions.height;if(s=t,i=e,o=this.mOptions.invertNotation||!1,this.g.compulsoryCatch=!0,this.g.canStepBack=!0,this.g.mustMoveForward=!1,this.g.mustMoveForwardStrict=!1,this.g.lastRowFreeze=!1,this.g.lastRowCrown=!1,this.g.captureLongestLine=!1,this.g.noMove="lose",this.g.kingCaptureShort=!1,this.g.kingValue=5,this.g.lastRowFactor=0,this.g.canCaptureBackward=!0,this.g.captureInstantRemove=!1,this.g.longRangeKing=!0,this.g.drawKvsK=!0,this.g.drawKvs2K=!0,this.g.whiteStarts=!0,this.g.king180deg=!1,this.g.suicide=!1,this.mOptions.variant)for(var n in this.mOptions.variant)this.mOptions.variant.hasOwnProperty(n)&&(this.g[n]=this.mOptions.variant[n]);this.BuildGraphCoord(),this.zobrist=new JocGame.Zobrist({board:{type:"array",size:this.g.Graph.length,values:["1/0","1/1","-1/0","-1/1"]}})},Model.Game.DestroyGame=function(){},Model.Game.CheckersDirections=4,Model.Game.Checkers2WaysDirections=[0,1,1,0],Model.Game.CheckersEachDirection=function(t,s){for(var i=0;i3&&s.push(t(i.capt[e])));return s.join(o)}();case"hub":return function(){var s="-",o=[t(i.pos[0]),t(i.pos[i.pos.length-1])];if(i.capt[1]){s="x";var e=i.capt.slice(1).map(function(s){return t(s)});e.sort(),o=o.concat(e)}return o.join(s)}();case"dxp":return function(){var s=[t(i.pos[0]),t(i.pos[i.pos.length-1])];if(i.capt[1]){s.push(i.capt.length-1);for(var o=[],e=1;e=0;)i=t.g.Graph[i][c];if(null!=i&&e.board[i]>=0&&e.pieces[e.board[i]].s==-e.mWho){var v=i;if(i=t.g.Graph[i][c],t.g.kingCaptureShort){if(e.board[i]==-1||i==o[0]){for(var d=!0,f=0;f=0;){for(var d=!0,f=0;f=0&&e.pieces[e.board[i]].s==-e.mWho){var m,C;if(0==t.g.canCaptureBackward&&(m=t.g.Coord[i][0],C=!1,(e.mWho==JocGame.PLAYER_A&&m>=l||e.mWho==JocGame.PLAYER_B&&m<=l)&&(C=!0)),t.g.canCaptureBackward||1==C){var b=t.g.Graph[i][c];if(null!=b&&(e.board[b]==-1||b==o[0]||null!==b&&t.g.captureInstantRemove&&n.indexOf(b)>=0)){for(var d=!0,f=0;f1&&e.mMoves.push({pos:o,capt:n});break}if(!t.g.compulsoryCatch&&o.length>1){for(var c=[],l=0;ln||e.mWho==JocGame.PLAYER_B&&hn)&&(p=!1)),t.g.lastRowFreeze&&(u=!1,(e.mWho==JocGame.PLAYER_A&&n==o-1||e.mWho==JocGame.PLAYER_B&&0==n)&&(u=!0)),e.board[r]!=-1||!t.g.canStepBack&&r==e.pieces[s].l||(0!=t.g.mustMoveForward||0!=t.g.mustMoveForwardStrict)&&1!=p||0!=t.g.lastRowFreeze&&0!=u||e.mMoves.push({pos:[i,r],capt:[null,null]}),!0})):1==e.pieces[s].t&&t.CheckersEachDirection(i,function(s,o){if(t.g.longRangeKing)for(;e.board[s]==-1;)e.mMoves.push({pos:[i,s],capt:[null,null]}),s=t.g.Graph[s][o];else e.board[s]==-1&&(e.mMoves.push({pos:[i,s],capt:[null,null]}),s=t.g.Graph[s][o]);return!0})}),0==this.mMoves.length)switch(t.g.noMove){case"count":this.mFinished=!0,this.pCount[0]a&&(r=[p],a=p.pos.length)}this.mMoves=r}},Model.Board.Evaluate=function(t,s,i){if(t.mOptions.preventRepeat&&t.GetRepeatOccurence(this)>2)return this.mFinished=!0,void(this.mWinner=JocGame.DRAW);if(t.g.drawKvsK&&0==this.spCount[0]&&0==this.spCount[1]&&1==this.kpCount[0]&&1==this.kpCount[1])return this.mFinished=!0,void(this.mWinner=JocGame.DRAW);if(t.g.drawKvs2K&&0==this.spCount[0]&&0==this.spCount[1]&&this.kpCount[0]+this.kpCount[1]==3&&(1==this.kpCount[0]||2==this.kpCount[0]))return this.mFinished=!0,void(this.mWinner=JocGame.DRAW);if(0==this.pCount[1])return this.mFinished=!0,void(this.mWinner=t.g.suicide?JocGame.PLAYER_B:JocGame.PLAYER_A);if(0==this.pCount[0])return this.mFinished=!0,void(this.mWinner=t.g.suicide?JocGame.PLAYER_A:JocGame.PLAYER_B);if(this.mEvaluation=10*(this.spCount[0]-this.spCount[1])+10*(this.kpCount[0]-this.kpCount[1])*t.g.kingValue+this.pCount[0]/this.pCount[1]-this.pCount[1]/this.pCount[0],0!=t.g.lastRowFactor){for(var o=t.mOptions.height,e=0,n=0,r=0;r=0&&(a[this.board[u]]=!0),this.board[u]=-1),o=p}this.zSign=t.zobrist.update(this.zSign,"board",n.s+"/"+n.t,p);var c=s.capt[s.capt.length-1];n.plp=c||s.pos[s.pos.length-2];for(var l in a)if(a.hasOwnProperty(l)){var g=this.pieces[l],v=(1-g.s)/2;switch(this.pCount[v]--,g.t){case 0:this.spCount[v]--;break;case 1:this.kpCount[v]--}this.zSign=t.zobrist.update(this.zSign,"board",g.s+"/"+g.t,g.p),this.pieces[l]=null}if(t.g.lastRowCrown&&0==this.pieces[e].t){var d=t.g.Coord[s.pos[s.pos.length-1]][0];if(r==JocGame.PLAYER_A&&d==i-1||r==JocGame.PLAYER_B&&0==d){var g=this.pieces[e];g.t=1;var f=(1-r)/2;this.spCount[f]--,this.kpCount[f]++,this.zSign=t.zobrist.update(this.zSign,"board",g.s+"/0",g.p),this.zSign=t.zobrist.update(this.zSign,"board",g.s+"/1",g.p)}}},Model.Board.IsValidMove=function(t,s){return!0},Model.Board.GetSignature=function(){return this.zSign},Model.Game.Import=function(t,s){function i(t,s,i){i=n-i;var o=i%r;i=i-o+r-o-1,e.push({s:t,p:i,l:-1,t:s,plp:i})}var o=1,e=[],n=this.mOptions.width*this.mOptions.height,r=this.mOptions.width;if("pjn"==t){var a=s.split(":");o="W"==a[0]?1:-1;for(var h=1;h0&&(s=h)}return e.call(this,t,s)},Model.Board.ExportBoardState=function(o,e){function n(t){for(var o=[],e=0;e=0?(e.push(n+u+"-"+p),p=-1):u>=0&&e.push(n+u),u=t),h=parseInt(t)}),p>=0?e.push(n+u+"-"+p):u>=0&&e.push(n+u)}else a.pos.forEach(function(t){e.push(n+t)})}i.push(o+e.join(","))}return i.join(":")}();case"dxp":return function(){return n("z")}();case"hub":return function(){return n("z")}();default:return JSON.stringify(this)}}}(),Model.Game.BuildGraphCoord=function(){for(var t=this.mOptions.width,s=this.mOptions.height,i=[],o=[],e=0;e0?i[r].push((e+1)*t+n-1):i[r].push(null)):(i[r].push(null),i[r].push(null)),e>0?(i[r].push((e-1)*t+n),n>0?i[r].push((e-1)*t+n-1):i[r].push(null)):(i[r].push(null),i[r].push(null))):(e0?(n").addClass("piece").addClass(a).css({width:h.g.cellSide-2*h.g.cellMargin,height:h.g.cellSide-2*h.g.cellMargin,"border-radius":Math.floor((h.g.cellSide-2*h.g.cellMargin)/2)}).hide();s.attr("jocindex",i),s.attr("joctype",0),s.appendTo(h.mWidget);var r=$("").addClass("piece-canvas").attr("width",h.g.cellSide-2*h.g.cellMargin).attr("height",h.g.cellSide-2*h.g.cellMargin);r.appendTo(s),"halloween"==t.mSkin?t.CheckersDrawPieceHalloween(r,1==e&&t.g.whiteStarts||e==-1&&0==t.g.whiteStarts?"white":"black"):t.CheckersDrawPiece(r,1==e&&t.g.whiteStarts||e==-1&&0==t.g.whiteStarts?"white":"black")}var t=this,i=this.mOptions.width,a=this.mOptions.height,s=this.mOptions.initial;this.CheckersSetCellSide(),this.g.cellMargin=Math.floor(this.g.cellSide/this.CheckersMarginFactor),this.g.tokenSide=this.g.cellSide-2*this.g.cellMargin,this.CheckersSetBoardSize(),this.g.top=Math.floor((this.mGeometry.height-this.g.boardH)/2),this.g.left=Math.floor((this.mGeometry.width-this.g.boardW)/2),"halloween"==this.mSkin&&(this.g.piecesRes=this.preloadedImages.pieces);var r=$("
").addClass("checkersbase-board").css({top:this.g.top,left:this.g.left,width:this.g.boardW,height:this.g.boardH}).appendTo(this.mWidget),o=$("").attr("width",this.g.boardW).attr("height",this.g.boardH).appendTo(r);this.g.ctxField=o[0].getContext("2d"),this.g.ctxField.clearRect(0,0,this.g.boardW,this.g.boardH),this.g.ctxField.save(),this.CheckersDrawBoard(),this.g.ctxField.restore();var h=this,l=0;for(var c in s.a)s.a.hasOwnProperty(c)&&e(JocGame.PLAYER_A,l++);for(var c in s.b)s.b.hasOwnProperty(c)&&e(JocGame.PLAYER_B,l++);for(var c=0;c").addClass("possible").css({width:this.g.cellSide-this.CheckersPossibleMarginFactor*h.g.cellMargin,height:this.g.cellSide-this.CheckersPossibleMarginFactor*h.g.cellMargin,"border-radius":Math.floor((h.g.cellSide-this.CheckersPossibleMarginFactor*h.g.cellMargin)/2),top:p.top+this.CheckersPossibleMarginFactor*this.g.cellMargin/2,left:p.left+this.CheckersPossibleMarginFactor*this.g.cellMargin/2}).hide();m.attr("jocpos",c),m.appendTo(h.mWidget)}var w=$("
").addClass("front").css({width:this.g.cellSide,height:this.g.cellSide,top:p.top,left:p.left});if(w.attr("jocpos",c),w.appendTo(h.mWidget),this.CheckersDrawCell(d,g,p.top,p.left,this.g.cellSide,this.g.cellSide),this.mNotation){var f=this.g.cellSide/8;$("
").text(parseInt(c)+1).addClass("notation").css({"line-height":f+"px","font-size":f+"pt",top:p.top,left:p.left,"text-shadow":"0px "+f/10+"px "+f/15+"px#000"}).appendTo(this.mWidget)}}},View.Board.Display=function(e){for(var t=e.mOptions.width,i=e.mOptions.height,a=0;a=t.pos.length?e.MoveShown():i(r)})}this.UpdateZIndex(e);var a=e.mOptions.width,s=e.mOptions.height,r=this.board[t.pos[t.pos.length-1]],o=e.mWidget.find(".piece[jocindex="+r+"]");return i(1),!1},View.Board.HumanTurn=function(e){function t(t){var i=e.g.Coord[t],o=i[0],h=i[1];e.mViewAs==JocGame.PLAYER_A?o=r-o-1:h=s-h-1;var l=e.CheckersGetCellPosition(o,h);a.animate({top:l.top+e.g.cellMargin,left:l.left+e.g.cellMargin},500,function(){})}function i(){e.mWidget.find(".possible").hide(),e.mWidget.find(".front").unbind(JocGame.CLICK).removeClass("choice back"),l.length>0&&e.mWidget.find(".front[jocpos="+l[l.length-1]+"]").addClass("back").bind(JocGame.CLICK,function(){t(l[0]),h=0,l=[],c=[],i()});for(var s=[],r=0;r0){var a=new Image;a.onload=function(){i.g.ctxField.drawImage(a,0,0,i.g.boardW,i.g.boardH)},a.src=t}else{var s=this.g.ctxField.createRadialGradient(-this.g.boardW/2,-this.g.boardW/2,0,this.g.boardW/6*4,this.g.boardW/6*2,2*this.g.boardW);s.addColorStop(0,"#BAF445"),s.addColorStop(1,"#008000"),this.g.ctxField.fillStyle=s,this.g.ctxField.beginPath(),this.g.ctxField.rect(0,0,this.g.boardW,this.g.boardH),this.g.ctxField.closePath(),this.g.ctxField.fill()}},View.Game.CheckersSetBoardSize=function(){var e=this.mOptions.width,t=this.mOptions.height;this.g.boardW=this.g.cellSide*e*2,this.g.boardH=this.g.cellSide*t},View.Game.CheckersGetCellPosition=function(e,t){return{top:this.g.top+e*this.g.cellSide,left:this.g.left+(2*t+(1-e%2))*this.g.cellSide}},View.Game.CheckersDrawCell=function(e,t,i,a,s,r){var o=$("
").addClass("cell").css({top:i,left:a,width:s,height:r}).attr("joclypos",e+" "+t).appendTo(this.mWidget);"green"==this.mSkin&&o.addClass("cell-black")}; \ No newline at end of file diff --git a/dist/browser/games/checkers/halloweenthumb.png b/dist/browser/games/checkers/halloweenthumb.png deleted file mode 100644 index df7bf24..0000000 Binary files a/dist/browser/games/checkers/halloweenthumb.png and /dev/null differ diff --git a/dist/browser/games/checkers/rules-suicide-checkers.html b/dist/browser/games/checkers/rules-suicide-checkers.html index 9ff1a8d..b20a639 100644 --- a/dist/browser/games/checkers/rules-suicide-checkers.html +++ b/dist/browser/games/checkers/rules-suicide-checkers.html @@ -12,6 +12,8 @@

In English Draughts, the additional rules also apply:

    +
  • The winner is the player that cannot play any move, either because + there is no piece left or all remaining pieces are blocked
  • The board and initial position is the following:

  • diff --git a/dist/browser/jocly-allgames.js b/dist/browser/jocly-allgames.js index d23ff2e..27aa5fb 100644 --- a/dist/browser/jocly-allgames.js +++ b/dist/browser/jocly-allgames.js @@ -1 +1 @@ -"use strict";exports.games={"alquerque-roman":{title:"Roman Alquerque",summary:"Alquerque as played in France and England.",thumbnail:"alquerque-roman-thumb3d.png",module:"checkers"},"alquerque-arabic":{title:"Arabic Alquerque",summary:"Alquerque as played in Middle-East and Spain.",thumbnail:"alquerque-arabic-thumb.png",module:"checkers"},draughts:{title:"International Draughts",summary:"Rules for draughts as played in worldwide competitions.",thumbnail:"draughts-thumb3d.png",module:"checkers"},"english-draughts":{title:"English Draughts",summary:"A popular version of checkers on a 8x8 board.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"suicide-checkers":{title:"Suicide checkers",summary:"A.k.a Giveaway checkers or Anti-checkers",thumbnail:"draughts8-suicide-thumb3d.png",module:"checkers"},"brazilian-draughts":{title:"Brazilian Draughts",summary:"Same as international checkers on a 8x8 board.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"spanish-draughts":{title:"Spanish Draughts",summary:"Same as international checkers on a 8x8 board, no backward capture.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"brazilian-draughts-hlwn":{title:"Halloween Draughts",summary:"Same as international checkers on a 8x8 board.",thumbnail:"halloweenthumb.png",module:"checkers",obsolete:!0},"german-draughts":{title:"German Draughts",summary:"Checkers according to German Draughts rules.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"thai-draughts":{title:"Thai Draughts",summary:"Checkers according to Thai rules.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"kids-draughts":{title:"Kids Draughts",summary:"A version for kids of checkers on a 6x6 board.",thumbnail:"kidsdraughts-thumb3d.png",module:"checkers"},"turkish-draughts":{title:"Turkish Draughts",summary:"A 8x8 checkers on straight lines.",thumbnail:"turkish-thumb3d.png",module:"checkers"},"classic-chess":{title:"Chess",summary:"Regular Orthodox Classic Western Chess",thumbnail:"knight-thumbnail.png",module:"chessbase"},"losing-chess":{title:"Losing Chess",summary:"Also known as Antichess, Suicide Chess, Giveaway Chess, ...",thumbnail:"knight-inv-thumbnail.png",module:"chessbase"},xiangqi:{title:"Xiangqi",summary:"Chinese Chess",thumbnail:"xiangqi-thumb.png",module:"chessbase"},"gardner-chess":{title:"Gardner MiniChess",summary:"Gardner 5x5 minichess (1969)",thumbnail:"gardner-thumb.png",module:"chessbase",obsolete:!1},"mini4x4-chess":{title:"Mini Chess 4x4",summary:"4x4 mini chess variant",thumbnail:"mini4x4-thumb.png",module:"chessbase",obsolete:!1},"mini4x5-chess":{title:"Mini Chess 4x5",summary:"4x5 mini chess variant",thumbnail:"mini4x5-thumb.png",module:"chessbase",obsolete:!1},"micro4x5-chess":{title:"Micro Chess",summary:"4x5 chess variant by Glimne (1997)",thumbnail:"micro4x5-thumb.png",module:"chessbase",obsolete:!1},"baby-chess":{title:"Baby Chess",summary:"5x5 Baby chess",thumbnail:"baby-thumb.png",module:"chessbase",obsolete:!1},"malett-chess":{title:"Malett Chess",summary:"5x5 chess variant by Jeff Malett",thumbnail:"malett-thumb.png",module:"chessbase",obsolete:!1},"los-alamos-chess":{title:"Los Alamos Chess",summary:"6x6 chess variant",thumbnail:"los-alamos-thumb.png",module:"chessbase",obsolete:!1},"attack-chess":{title:"Chess Attack",summary:"5x6 chess variant",thumbnail:"attack-thumb.png",module:"chessbase",obsolete:!1},"courier-chess":{title:"Courier Chess",summary:"12x8 chess (12th century)",thumbnail:"courier-thumb.png",module:"chessbase"},makruk:{title:"Makruk",summary:"Thai Chess",thumbnail:"mk-thumb.png",module:"chessbase"},"shako-chess":{title:"Shako",summary:"10x10 Chess",thumbnail:"shako-thumb.png",module:"chessbase"},"shatranj-chess":{title:"Shatranj",summary:"Ancient Chess",thumbnail:"shatranj-thumb.png",module:"chessbase",obsolete:!1},"basic-chess":{title:"Basic Chess",summary:"Basic Chess",thumbnail:"knight-thumbnail.png",module:"chessbase",obsolete:!0},raumschach:{title:"Raumschach",summary:"5x5x5 Chess",thumbnail:"raumschach-thumb.png",module:"chessbase",obsolete:!1},"glinski-chess":{title:"Glinski Chess",summary:"Hexagonal Chess",thumbnail:"glinski-thumb.png",module:"chessbase",obsolete:!1},"brusky-chess":{title:"Brusky Chess",summary:"Hexagonal Chess",thumbnail:"brusky-thumb.png",module:"chessbase",obsolete:!1},"devasa-chess":{title:"De Vasa Chess",summary:"Hexagonal Chess",thumbnail:"devasa-thumb.png",module:"chessbase",obsolete:!1},"mccooey-chess":{title:"McCooey Chess",summary:"Hexagonal Chess",thumbnail:"mccooey-thumb.png",module:"chessbase",obsolete:!1},"shafran-chess":{title:"Shafran Chess",summary:"Hexagonal Chess",thumbnail:"shafran-thumb.png",module:"chessbase",obsolete:!1},"circular-chess":{title:"Modern Circular Chess",summary:"Chess on a ring",thumbnail:"circular-thumb.png",module:"chessbase",obsolete:!1},"byzantine-chess":{title:"Byzantine Chess",summary:"10th century circular Chess",thumbnail:"byzantine-thumb.png",module:"chessbase",obsolete:!1},"3dchess":{title:"3D Chess",summary:"6x8x3 Chess",thumbnail:"3dchess-thumb.png",module:"chessbase",obsolete:!1},"cylinder-chess":{title:"Cylinder Chess",summary:"Cylinder Chess",thumbnail:"cylinder-thumb.png",module:"chessbase",obsolete:!1},"cubic-chess":{title:"360 Chess Authoring",summary:"Inventing the 360 Chess variant on a cube",thumbnail:"cubic-chess-thumb.png",module:"chessbase",obsolete:!0},"rollerball-chess":{title:"Rollerball Chess",summary:"Chess variant on an unusual board",thumbnail:"rollerball-thumb.png",module:"chessbase",obsolete:!1},chess960:{title:"Chess 960",summary:"Chess from randomized positions",thumbnail:"chess960-thumb.png",module:"chessbase",obsolete:!1},"metamachy-chess":{title:"Metamachy",summary:"Chess on 12x12 with fairy pieces",thumbnail:"metamachy-thumb.png",module:"chessbase",obsolete:!1},"capablanca-chess":{title:"Capablanca Chess",summary:"Chess on 10x8 (1920)",thumbnail:"capablanca-thumb.png",module:"chessbase",obsolete:!1},"carrera-chess":{title:"Carerra Chess",summary:"Chess on 10x8 (1617)",thumbnail:"carrera-thumb.png",module:"chessbase",obsolete:!1},"gothic-chess":{title:"Gothic Chess",summary:"Chess on 10x8 (2000)",thumbnail:"gothic-thumb.png",module:"chessbase",obsolete:!1},"janus-chess":{title:"Janus Chess",summary:"Chess on 10x8 (1978)",thumbnail:"janus-thumb.png",module:"chessbase",obsolete:!1},"grand-chess":{title:"Grand Chess",summary:"Chess on 10x10 (1984)",thumbnail:"grand-thumb.png",module:"chessbase",obsolete:!1},"modern-chess":{title:"Modern Chess",summary:"Chess on 9x9 (1968)",thumbnail:"modern-thumb.png",module:"chessbase",obsolete:!1},"chancellor-chess":{title:"Chancellor Chess",summary:"Chess on 9x9 (1887)",thumbnail:"chancellor-thumb.png",module:"chessbase",obsolete:!1},"wildebeest-chess":{title:"Wildebeest Chess",summary:"Chess on 11x10 (1987)",thumbnail:"wildebeest-thumb.png",module:"chessbase",obsolete:!1},smess:{title:"Smess",summary:"The Ninny's Chess (1970)",thumbnail:"smess-thumb.png",module:"chessbase",obsolete:!1},"demi-chess":{title:"Demi-Chess",summary:"4x8 chess variant by Peter Krystufek (1986)",thumbnail:"demi-thumb.png",module:"chessbase",obsolete:!1},"romanchenko-chess":{title:"Romanchenko's Chess",summary:"Shifted 8x8 chess variant by V. Romanchenko",thumbnail:"romanchenko-thumb.png",module:"chessbase",obsolete:!1},"amazon-chess":{title:"Amazon Chess",summary:"18th century, Russia",thumbnail:"amazon-thumb.png",module:"chessbase",obsolete:!1},"dukerutland-chess":{title:"Duke of Rutland Chess",summary:"Chess on 14x10 (1747)",thumbnail:"dukerutland-thumb.png",module:"chessbase",obsolete:!1},"gustav3-chess":{title:"Gustav III Chess",summary:"Gustav Johan Billberg, 1839",thumbnail:"gustav3-thumb.png",module:"chessbase",obsolete:!1},"hyderabad-chess":{title:"Hyderabad Decimal Chess",summary:"Shir Muhammad Khan Iman, 1797-1798",thumbnail:"hyderabad-thumb.png",module:"chessbase",obsolete:!1},"kaisergame-chess":{title:"Kaiserspiel",summary:"Tressau, 1840",thumbnail:"kaisergame-thumb.png",module:"chessbase",obsolete:!1},"sultangame-chess":{title:"Sultanspiel",summary:"Tressau, 1840",thumbnail:"sultangame-thumb.png",module:"chessbase",obsolete:!1},"reformed-courier-chess":{title:"Reformed Courierspiel",summary:"Clément Bégnis, 2011",thumbnail:"reformed-courier-thumb.png",module:"chessbase",obsolete:!1},"tutti-frutti-chess":{title:"Tutti-Frutti Chess",summary:"Ralph Betza et Philip Cohen, 1978-79",thumbnail:"tutti-frutti-thumb.png",module:"chessbase",obsolete:!1},"sweet16-chess":{title:"Sweet 16 Chess",summary:"A huge 16x16 Chess Variant",thumbnail:"sweet16-thumb.png",module:"chessbase",obsolete:!1},fourinarow:{title:"Four In A Row",summary:"Four In A Row game",thumbnail:"fiar-thumb.png",module:"fourinarow"},fourinarow96:{title:"Four In A Row 9x6",summary:"Four In A Row on a 9x6 board",thumbnail:"fiar-thumb.png",module:"fourinarow"},fiarpopout:{title:"Popout",summary:"Four In A Row with removals",thumbnail:"fiar-thumb.png",module:"fourinarow"},fiveinarow:{title:"Five In A Row",summary:"Variant of Four In A Row",thumbnail:"fiar-thumb.png",module:"fourinarow"},torus4:{title:"Torus 4",summary:"Four In A Row on a cylinder",thumbnail:"fiar-torus-thumb.png",module:"fourinarow"},decercarlaliebre:{title:"De cercar la liebre",summary:"Middle age hunt game",thumbnail:"decercarlaliebre-thumbnail.png",module:"hunt"},mana:{title:"Mana",summary:"Capture the opponent's Damyo",thumbnail:"thumbnail.png",module:"mana"},"shibumi-spline":{title:"Spline",summary:"Shibumi game",thumbnail:"tn-shibumi-spline.png",module:"margo"},"shibumi-splineplus":{title:"Spline+",summary:"Shibumi game",thumbnail:"tn-shibumi-spline-plus.png",module:"margo"},"shibumi-spargo":{title:"Spargo",summary:"Margo on the Shibumi platform",thumbnail:"tn-spargo.png",module:"margo"},margo5:{title:"Margo 5",summary:"Margo game",thumbnail:"tn-margo5.png",module:"margo"},margo6:{title:"Margo 6",summary:"Margo game",thumbnail:"tn-margo6.png",module:"margo"},margo7:{title:"Margo 7",summary:"Margo game",thumbnail:"tn-margo7.png",module:"margo"},margo8:{title:"Margo 8",summary:"Margo game",thumbnail:"tn-margo8.png",module:"margo"},"9-men-morris":{title:"9 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris9-thumb3d.png",module:"mills"},"9-men-morris-fly":{title:"9 Men´s Morris Fly",summary:"An old board game",thumbnail:"mensmorris9-thumb3d.png",module:"mills"},"12-men-morris":{title:"12 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris12-thumb3d.png",module:"mills"},"12-men-morris-fly":{title:"12 Men´s Morris Fly",summary:"An old board game",thumbnail:"mensmorris12-thumb3d.png",module:"mills"},"6-men-morris":{title:"6 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris6-thumb3d.png",module:"mills"},"3-men-morris":{title:"6 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris3-thumb3d.png",module:"mills"},"7-men-morris":{title:"7 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris7-thumb3d.png",module:"mills"},pensoc:{title:"Penguin soccer",summary:"Penguins playing soccer",thumbnail:"thumbnail.png",module:"pensoc"},reversi:{title:"Annexation",summary:"Also called Reversi or Othello",thumbnail:"thumb-reversi.png",module:"reversi"},reversi6:{title:"Annexation 6",summary:"Reversi/Othello rules on a 6x6 board",thumbnail:"thumb-reversi6.png",module:"reversi"},reversi4:{title:"Annexation 4",summary:"Reversi/Othello rules on a 4x4 board",thumbnail:"thumb-reversi4.png",module:"reversi"},reversi10:{title:"Annexation 10",summary:"Reversi/Othello rules on a 10x10 board",thumbnail:"thumb-reversi10.png",module:"reversi"},reversicross:{title:"Annexation Cross",summary:"Reversi/Othello rules on a cross-shaped board",thumbnail:"thumb-cross.png",module:"reversi"},reversicross10:{title:"Annexation Cross 10",summary:"Reversi/Othello rules on a 10x10 cross-shaped board",thumbnail:"thumb-cross10.png",module:"reversi"},reversiturnover:{title:"Annexation Turn-Over",summary:"Reversi/Othello rules on a 10x10 octogonal-shaped board",thumbnail:"thumb-turnover.png",module:"reversi"},scrum:{title:"Scrum",summary:"A little rugby game",thumbnail:"scrum-thumb3d.png",module:"scrum"},"tafl-tablut":{title:"Tablut",summary:"9x9 board (from Laponia)",thumbnail:"thumb-tafl-tablut.png",module:"tafl"},"tafl-ardri":{title:"Ardri",summary:"7x7 board (from Scotland)",thumbnail:"thumb-tafl-ardri.png",module:"tafl"},"tafl-hnefatafl":{title:"Hnefatafl",summary:"11x11 board (from Scandinavia)",thumbnail:"thumb-tafl-hnefatafl.png",module:"tafl"},tawlbwrdd:{title:"Tawlbwrdd",summary:"11x11 board (from Wales)",thumbnail:"thumb-tawlbwrdd.png",module:"tafl"},"tafl-brandubh":{title:"Brandubh",summary:"7x7 board (from Ireland)",thumbnail:"thumb-tafl-brandubh.png",module:"tafl"},"alea-evangelii":{title:"Alea Evangelii",summary:"19x19 board (from England)",thumbnail:"thumb-alea-evangelii.png",module:"tafl"},yohoho:{title:"Yohoho!",summary:"Sea Battle over hexagons",thumbnail:"yohoho-thumb3d.png",module:"yohoho"}}; \ No newline at end of file +"use strict";exports.games={"alquerque-roman":{title:"Roman Alquerque",summary:"Alquerque as played in France and England.",thumbnail:"alquerque-roman-thumb3d.png",module:"checkers"},"alquerque-arabic":{title:"Arabic Alquerque",summary:"Alquerque as played in Middle-East and Spain.",thumbnail:"alquerque-arabic-thumb.png",module:"checkers"},draughts:{title:"International Draughts",summary:"Rules for draughts as played in worldwide competitions.",thumbnail:"draughts-thumb3d.png",module:"checkers"},"english-draughts":{title:"English Draughts",summary:"A popular version of checkers on a 8x8 board.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"suicide-checkers":{title:"Suicide checkers",summary:"A.k.a Giveaway checkers or Anti-checkers",thumbnail:"draughts8-suicide-thumb3d.png",module:"checkers"},"brazilian-draughts":{title:"Brazilian Draughts",summary:"Same as international checkers on a 8x8 board.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"spanish-draughts":{title:"Spanish Draughts",summary:"Same as international checkers on a 8x8 board, no backward capture.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"german-draughts":{title:"German Draughts",summary:"Checkers according to German Draughts rules.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"thai-draughts":{title:"Thai Draughts",summary:"Checkers according to Thai rules.",thumbnail:"draughts8-thumb3d.png",module:"checkers"},"kids-draughts":{title:"Kids Draughts",summary:"A version for kids of checkers on a 6x6 board.",thumbnail:"kidsdraughts-thumb3d.png",module:"checkers"},"turkish-draughts":{title:"Turkish Draughts",summary:"A 8x8 checkers on straight lines.",thumbnail:"turkish-thumb3d.png",module:"checkers"},"classic-chess":{title:"Chess",summary:"Regular Orthodox Classic Western Chess",thumbnail:"knight-thumbnail.png",module:"chessbase"},"losing-chess":{title:"Losing Chess",summary:"Also known as Antichess, Suicide Chess, Giveaway Chess, ...",thumbnail:"knight-inv-thumbnail.png",module:"chessbase"},xiangqi:{title:"Xiangqi",summary:"Chinese Chess",thumbnail:"xiangqi-thumb.png",module:"chessbase"},"gardner-chess":{title:"Gardner MiniChess",summary:"Gardner 5x5 minichess (1969)",thumbnail:"gardner-thumb.png",module:"chessbase",obsolete:!1},"mini4x4-chess":{title:"Mini Chess 4x4",summary:"4x4 mini chess variant",thumbnail:"mini4x4-thumb.png",module:"chessbase",obsolete:!1},"mini4x5-chess":{title:"Mini Chess 4x5",summary:"4x5 mini chess variant",thumbnail:"mini4x5-thumb.png",module:"chessbase",obsolete:!1},"micro4x5-chess":{title:"Micro Chess",summary:"4x5 chess variant by Glimne (1997)",thumbnail:"micro4x5-thumb.png",module:"chessbase",obsolete:!1},"baby-chess":{title:"Baby Chess",summary:"5x5 Baby chess",thumbnail:"baby-thumb.png",module:"chessbase",obsolete:!1},"malett-chess":{title:"Malett Chess",summary:"5x5 chess variant by Jeff Malett",thumbnail:"malett-thumb.png",module:"chessbase",obsolete:!1},"los-alamos-chess":{title:"Los Alamos Chess",summary:"6x6 chess variant",thumbnail:"los-alamos-thumb.png",module:"chessbase",obsolete:!1},"attack-chess":{title:"Chess Attack",summary:"5x6 chess variant",thumbnail:"attack-thumb.png",module:"chessbase",obsolete:!1},"courier-chess":{title:"Courier Chess",summary:"12x8 chess (12th century)",thumbnail:"courier-thumb.png",module:"chessbase"},makruk:{title:"Makruk",summary:"Thai Chess",thumbnail:"mk-thumb.png",module:"chessbase"},"shako-chess":{title:"Shako",summary:"10x10 Chess",thumbnail:"shako-thumb.png",module:"chessbase"},"shatranj-chess":{title:"Shatranj",summary:"Ancient Chess",thumbnail:"shatranj-thumb.png",module:"chessbase",obsolete:!1},"basic-chess":{title:"Basic Chess",summary:"Basic Chess",thumbnail:"knight-thumbnail.png",module:"chessbase",obsolete:!0},raumschach:{title:"Raumschach",summary:"5x5x5 Chess",thumbnail:"raumschach-thumb.png",module:"chessbase",obsolete:!1},"glinski-chess":{title:"Glinski Chess",summary:"Hexagonal Chess",thumbnail:"glinski-thumb.png",module:"chessbase",obsolete:!1},"brusky-chess":{title:"Brusky Chess",summary:"Hexagonal Chess",thumbnail:"brusky-thumb.png",module:"chessbase",obsolete:!1},"devasa-chess":{title:"De Vasa Chess",summary:"Hexagonal Chess",thumbnail:"devasa-thumb.png",module:"chessbase",obsolete:!1},"mccooey-chess":{title:"McCooey Chess",summary:"Hexagonal Chess",thumbnail:"mccooey-thumb.png",module:"chessbase",obsolete:!1},"shafran-chess":{title:"Shafran Chess",summary:"Hexagonal Chess",thumbnail:"shafran-thumb.png",module:"chessbase",obsolete:!1},"circular-chess":{title:"Modern Circular Chess",summary:"Chess on a ring",thumbnail:"circular-thumb.png",module:"chessbase",obsolete:!1},"byzantine-chess":{title:"Byzantine Chess",summary:"10th century circular Chess",thumbnail:"byzantine-thumb.png",module:"chessbase",obsolete:!1},"3dchess":{title:"3D Chess",summary:"6x8x3 Chess",thumbnail:"3dchess-thumb.png",module:"chessbase",obsolete:!1},"cylinder-chess":{title:"Cylinder Chess",summary:"Cylinder Chess",thumbnail:"cylinder-thumb.png",module:"chessbase",obsolete:!1},"cubic-chess":{title:"360 Chess Authoring",summary:"Inventing the 360 Chess variant on a cube",thumbnail:"cubic-chess-thumb.png",module:"chessbase",obsolete:!0},"rollerball-chess":{title:"Rollerball Chess",summary:"Chess variant on an unusual board",thumbnail:"rollerball-thumb.png",module:"chessbase",obsolete:!1},chess960:{title:"Chess 960",summary:"Chess from randomized positions",thumbnail:"chess960-thumb.png",module:"chessbase",obsolete:!1},"metamachy-chess":{title:"Metamachy",summary:"Chess on 12x12 with fairy pieces",thumbnail:"metamachy-thumb.png",module:"chessbase",obsolete:!1},"capablanca-chess":{title:"Capablanca Chess",summary:"Chess on 10x8 (1920)",thumbnail:"capablanca-thumb.png",module:"chessbase",obsolete:!1},"carrera-chess":{title:"Carerra Chess",summary:"Chess on 10x8 (1617)",thumbnail:"carrera-thumb.png",module:"chessbase",obsolete:!1},"gothic-chess":{title:"Gothic Chess",summary:"Chess on 10x8 (2000)",thumbnail:"gothic-thumb.png",module:"chessbase",obsolete:!1},"janus-chess":{title:"Janus Chess",summary:"Chess on 10x8 (1978)",thumbnail:"janus-thumb.png",module:"chessbase",obsolete:!1},"grand-chess":{title:"Grand Chess",summary:"Chess on 10x10 (1984)",thumbnail:"grand-thumb.png",module:"chessbase",obsolete:!1},"modern-chess":{title:"Modern Chess",summary:"Chess on 9x9 (1968)",thumbnail:"modern-thumb.png",module:"chessbase",obsolete:!1},"chancellor-chess":{title:"Chancellor Chess",summary:"Chess on 9x9 (1887)",thumbnail:"chancellor-thumb.png",module:"chessbase",obsolete:!1},"wildebeest-chess":{title:"Wildebeest Chess",summary:"Chess on 11x10 (1987)",thumbnail:"wildebeest-thumb.png",module:"chessbase",obsolete:!1},smess:{title:"Smess",summary:"The Ninny's Chess (1970)",thumbnail:"smess-thumb.png",module:"chessbase",obsolete:!1},"demi-chess":{title:"Demi-Chess",summary:"4x8 chess variant by Peter Krystufek (1986)",thumbnail:"demi-thumb.png",module:"chessbase",obsolete:!1},"romanchenko-chess":{title:"Romanchenko's Chess",summary:"Shifted 8x8 chess variant by V. Romanchenko",thumbnail:"romanchenko-thumb.png",module:"chessbase",obsolete:!1},"amazon-chess":{title:"Amazon Chess",summary:"18th century, Russia",thumbnail:"amazon-thumb.png",module:"chessbase",obsolete:!1},"dukerutland-chess":{title:"Duke of Rutland Chess",summary:"Chess on 14x10 (1747)",thumbnail:"dukerutland-thumb.png",module:"chessbase",obsolete:!1},"gustav3-chess":{title:"Gustav III Chess",summary:"Gustav Johan Billberg, 1839",thumbnail:"gustav3-thumb.png",module:"chessbase",obsolete:!1},"hyderabad-chess":{title:"Hyderabad Decimal Chess",summary:"Shir Muhammad Khan Iman, 1797-1798",thumbnail:"hyderabad-thumb.png",module:"chessbase",obsolete:!1},"kaisergame-chess":{title:"Kaiserspiel",summary:"Tressau, 1840",thumbnail:"kaisergame-thumb.png",module:"chessbase",obsolete:!1},"sultangame-chess":{title:"Sultanspiel",summary:"Tressau, 1840",thumbnail:"sultangame-thumb.png",module:"chessbase",obsolete:!1},"reformed-courier-chess":{title:"Reformed Courierspiel",summary:"Clément Bégnis, 2011",thumbnail:"reformed-courier-thumb.png",module:"chessbase",obsolete:!1},"tutti-frutti-chess":{title:"Tutti-Frutti Chess",summary:"Ralph Betza et Philip Cohen, 1978-79",thumbnail:"tutti-frutti-thumb.png",module:"chessbase",obsolete:!1},"sweet16-chess":{title:"Sweet 16 Chess",summary:"A huge 16x16 Chess Variant",thumbnail:"sweet16-thumb.png",module:"chessbase",obsolete:!1},fourinarow:{title:"Four In A Row",summary:"Four In A Row game",thumbnail:"fiar-thumb.png",module:"fourinarow"},fourinarow96:{title:"Four In A Row 9x6",summary:"Four In A Row on a 9x6 board",thumbnail:"fiar-thumb.png",module:"fourinarow"},fiarpopout:{title:"Popout",summary:"Four In A Row with removals",thumbnail:"fiar-thumb.png",module:"fourinarow"},fiveinarow:{title:"Five In A Row",summary:"Variant of Four In A Row",thumbnail:"fiar-thumb.png",module:"fourinarow"},torus4:{title:"Torus 4",summary:"Four In A Row on a cylinder",thumbnail:"fiar-torus-thumb.png",module:"fourinarow"},decercarlaliebre:{title:"De cercar la liebre",summary:"Middle age hunt game",thumbnail:"decercarlaliebre-thumbnail.png",module:"hunt"},mana:{title:"Mana",summary:"Capture the opponent's Damyo",thumbnail:"thumbnail.png",module:"mana"},"shibumi-spline":{title:"Spline",summary:"Shibumi game",thumbnail:"tn-shibumi-spline.png",module:"margo"},"shibumi-splineplus":{title:"Spline+",summary:"Shibumi game",thumbnail:"tn-shibumi-spline-plus.png",module:"margo"},"shibumi-spargo":{title:"Spargo",summary:"Margo on the Shibumi platform",thumbnail:"tn-spargo.png",module:"margo"},margo5:{title:"Margo 5",summary:"Margo game",thumbnail:"tn-margo5.png",module:"margo"},margo6:{title:"Margo 6",summary:"Margo game",thumbnail:"tn-margo6.png",module:"margo"},margo7:{title:"Margo 7",summary:"Margo game",thumbnail:"tn-margo7.png",module:"margo"},margo8:{title:"Margo 8",summary:"Margo game",thumbnail:"tn-margo8.png",module:"margo"},"9-men-morris":{title:"9 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris9-thumb3d.png",module:"mills"},"9-men-morris-fly":{title:"9 Men´s Morris Fly",summary:"An old board game",thumbnail:"mensmorris9-thumb3d.png",module:"mills"},"12-men-morris":{title:"12 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris12-thumb3d.png",module:"mills"},"12-men-morris-fly":{title:"12 Men´s Morris Fly",summary:"An old board game",thumbnail:"mensmorris12-thumb3d.png",module:"mills"},"6-men-morris":{title:"6 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris6-thumb3d.png",module:"mills"},"3-men-morris":{title:"6 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris3-thumb3d.png",module:"mills"},"7-men-morris":{title:"7 Men´s Morris",summary:"An old board game",thumbnail:"mensmorris7-thumb3d.png",module:"mills"},pensoc:{title:"Penguin soccer",summary:"Penguins playing soccer",thumbnail:"thumbnail.png",module:"pensoc"},reversi:{title:"Annexation",summary:"Also called Reversi or Othello",thumbnail:"thumb-reversi.png",module:"reversi"},reversi6:{title:"Annexation 6",summary:"Reversi/Othello rules on a 6x6 board",thumbnail:"thumb-reversi6.png",module:"reversi"},reversi4:{title:"Annexation 4",summary:"Reversi/Othello rules on a 4x4 board",thumbnail:"thumb-reversi4.png",module:"reversi"},reversi10:{title:"Annexation 10",summary:"Reversi/Othello rules on a 10x10 board",thumbnail:"thumb-reversi10.png",module:"reversi"},reversicross:{title:"Annexation Cross",summary:"Reversi/Othello rules on a cross-shaped board",thumbnail:"thumb-cross.png",module:"reversi"},reversicross10:{title:"Annexation Cross 10",summary:"Reversi/Othello rules on a 10x10 cross-shaped board",thumbnail:"thumb-cross10.png",module:"reversi"},reversiturnover:{title:"Annexation Turn-Over",summary:"Reversi/Othello rules on a 10x10 octogonal-shaped board",thumbnail:"thumb-turnover.png",module:"reversi"},scrum:{title:"Scrum",summary:"A little rugby game",thumbnail:"scrum-thumb3d.png",module:"scrum"},"tafl-tablut":{title:"Tablut",summary:"9x9 board (from Laponia)",thumbnail:"thumb-tafl-tablut.png",module:"tafl"},"tafl-ardri":{title:"Ardri",summary:"7x7 board (from Scotland)",thumbnail:"thumb-tafl-ardri.png",module:"tafl"},"tafl-hnefatafl":{title:"Hnefatafl",summary:"11x11 board (from Scandinavia)",thumbnail:"thumb-tafl-hnefatafl.png",module:"tafl"},tawlbwrdd:{title:"Tawlbwrdd",summary:"11x11 board (from Wales)",thumbnail:"thumb-tawlbwrdd.png",module:"tafl"},"tafl-brandubh":{title:"Brandubh",summary:"7x7 board (from Ireland)",thumbnail:"thumb-tafl-brandubh.png",module:"tafl"},"alea-evangelii":{title:"Alea Evangelii",summary:"19x19 board (from England)",thumbnail:"thumb-alea-evangelii.png",module:"tafl"},yohoho:{title:"Yohoho!",summary:"Sea Battle over hexagons",thumbnail:"yohoho-thumb3d.png",module:"yohoho"}}; \ No newline at end of file diff --git a/dist/browser/jocly-xdview.js b/dist/browser/jocly-xdview.js index 4c165bc..e700b74 100644 --- a/dist/browser/jocly-xdview.js +++ b/dist/browser/jocly-xdview.js @@ -16,5 +16,5 @@ THREE.MTLLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManage function KalmanFilter(t){this.R=void 0===t.R?1:t.R,this.Q=void 0===t.Q?1:t.Q,this.A=void 0===t.A?1:t.A,this.C=void 0===t.C?1:t.C,this.B=void 0===t.B?0:t.B,this.cov=NaN,this.x=NaN}KalmanFilter.prototype.filter=function(t,i){if(void 0===i&&(i=0),isNaN(this.x))this.x=1/this.C*t,this.cov=1/this.C*this.Q*(1/this.C);else{const s=this.A*this.x+this.B*i,h=this.A*this.cov*this.A+this.R,o=h*this.C*(1/(this.C*h*this.C+this.Q));this.x=s+o*(t-this.C*s),this.cov=h-o*this.C*h}return this.x},KalmanFilter.prototype.lastMeasurement=function(){return this.x},KalmanFilter.prototype.setMeasurementNoise=function(t){this.Q=t},KalmanFilter.prototype.setProcessNoise=function(t){this.R=t}; JoclyAR=function(e){function t(){if(i)if(u||l.readyState!==l.HAVE_ENOUGH_DATA)requestAnimationFrame(t);else{u=!0,r.drawImage(l,0,0,s,c);var e=r.getImageData(0,0,s,c);h.postMessage({type:"Detect",imageData:e,vwidth:l.clientWidth,vheight:l.clientHeight})}}function n(e){var t=e.clientY,n=(t-b)/e.target.clientHeight;m=E*(1-n),d.animControl.trigger()}function o(e){switch(e.type){case"mousedown":1!=e.button&&2!=e.button||(b=e.clientY,E=m,e.target.addEventListener("mousemove",n));break;case"mouseup":case"mouseout":e.target.removeEventListener("mousemove",n)}}var a,r,i=!1,l=null,s=320,c=240,m=.2,d=null,u=!1,h=null,g=new THREE.Vector3,v=new THREE.Euler,b=null,E=m;return{start:function(){JoclyPlazza.webrtc.startLocal(!0,{video:{width:{ideal:s},height:{ideal:c},facingMode:"environment",frameRate:{ideal:24}}})},stop:function(){JoclyPlazza.webrtc.setChannel(null)},attach:function(e){l=e.element,JoclyPlazza.webrtc.attachMediaStream(e.element,e.stream),a=document.createElement("canvas"),a.setAttribute("width",s),a.setAttribute("height",c),Object.assign(a.style,{width:s,height:c,visibility:"hidden",position:"absolute","z-index":-2,top:0}),document.body.appendChild(a),r=a.getContext("2d"),d=e.threeCtx,i=!0,u=!1,d.renderer.domElement.addEventListener("mousedown",o),d.renderer.domElement.addEventListener("mouseup",o),d.renderer.domElement.addEventListener("mouseout",o),h=new Worker(JoclyPlazza.config.baseURL+JoclyPlazza.config.joclyPath+"/jocly.arworker.js"),h.onmessage=function(e){u=!1;var n=e.data;switch(n.type){case"Pose":var o=n.rotation,a=n.translation;d.body.position.set(0,0,0),d.camera.lookAt(new THREE.Vector3(0,-1,0)),d.harbor.scale.set(5*m,5*m,5*m),d.harbor.rotation.set(-Math.asin(-o[1][2]),Math.atan2(o[1][0],o[1][1]),-Math.atan2(o[0][2],o[2][2])),d.harbor.position.set(a[0],-a[2],-a[1]),d.harbor.position.equals(g)&&d.harbor.rotation.equals(v)||d.animControl.trigger(),g.copy(d.harbor.position),v.copy(d.harbor.rotation)}setTimeout(t,20)},h.postMessage({type:"Init",baseUrl:JoclyPlazza.config.baseURL+JoclyPlazza.config.joclyPath,modelSize:5,width:s,height:c}),requestAnimationFrame(t)},detach:function(e){d.renderer.domElement.removeEventListener("mousedown",o),d.renderer.domElement.removeEventListener("mouseup",o),d.renderer.domElement.removeEventListener("mouseout",o),JoclyPlazza.webrtc.detachMediaStream(e.element),l=null,i=!1,a.parentNode.removeChild(a),r=null,d=null,h.terminate(),h=null}}}(); function JHStateMachine(){}JHStateMachine.prototype={},JHStateMachine.prototype.init=function(){this.smState=null,this.smStates={},this.smEventQueue=[],this.smScheduled=!1,this.smPauseNotified=!1,this.smPaused=!0,this.smHistory=[],this.smGroups={}},JHStateMachine.prototype.smDebug=function(){},JHStateMachine.prototype.smWarning=function(){},JHStateMachine.prototype.smError=function(){},JHStateMachine.prototype.smTransition=function(t,s,e,i){t=this.smSolveStates(t),"string"==typeof s&&(s=[s]),"string"==typeof i&&(i=[i]);for(var n in t){var a=t[n];void 0===this.smStates[a]&&(this.smStates[a]={transitions:{},enteringMethods:[],leavingMethods:[]});for(var o in s){var h=s[o];void 0===this.smStates[a].transitions[h]&&(this.smStates[a].transitions[h]={state:null!=e?e:a,methods:[]});for(var r in i){var m=i[r];this.smStates[a].transitions[h].methods.push(m)}}}null!=e&&void 0===this.smStates[e]&&(this.smStates[e]={transitions:{},enteringMethods:[],leavingMethods:[]})},JHStateMachine.prototype.smEntering=function(t,s){"string"==typeof t&&(t=[t]),"string"==typeof s&&(s=[s]);for(var e in t){var i=t[e];void 0===this.smStates[i]&&(this.smStates[i]={transitions:{},enteringMethods:[],leavingMethods:[]});for(var n in s){var a=s[n];this.smStates[i].enteringMethods.push(a)}}},JHStateMachine.prototype.smLeaving=function(t,s){"string"==typeof t&&(t=[t]),"string"==typeof s&&(s=[s]);for(var e in t){var i=t[e];void 0===this.smStates[i]&&(this.smStates[i]={transitions:{},enteringMethods:[],leavingMethods:[]});for(var n in s){var a=s[n];this.smStates[i].leavingMethods.push(a)}}},JHStateMachine.prototype.smStateGroup=function(t,s){"string"==typeof s&&(s=[s]),void 0===this.smGroups[t]&&(this.smGroups[t]=[]),s=this.smSolveStates(s);for(var e in s){var i=s[e];this.smContained(i,this.smGroups[t])||this.smGroups[t].push(i)}},JHStateMachine.prototype.smSetInitialState=function(t){this.smState=t},JHStateMachine.prototype.smGetState=function(){return this.smState},JHStateMachine.prototype.smHandleEvent=function(t,s){if(void 0===this.smStates[this.smState])return void console.error("Unknown state '",this.smState,"'");var e={date:(new Date).getTime(),fromState:this.smState,event:t,methods:[]};try{e.args=JSON.stringify(s)}catch(t){}var i=this.smStates[this.smState].transitions[t];if(void 0===i)return void console.warn("JHStateMachine: Event '",t,"' not handled in state '",this.smState,"'");this.smCurrentEvent=t;var n=this.smState!=i.state;if(n){var a=this.smStates[this.smState].leavingMethods;for(var o in a)try{e.methods.push(a[o]),"function"==typeof a[o]?a[o].call(this,s):this["$"+a[o]](s)}catch(t){throw console.error("Exception in leaving [",this.smState,"] --> "+("function"==typeof a[o]?a[o].name:a[o])+"(",s,"): ",t),t}}for(var o in i.methods)try{e.methods.push(i.methods[o]),"function"==typeof i.methods[o]?i.methods[o].call(this,s):this["$"+i.methods[o]](s)}catch(e){throw console.error("Exception in ["+this.smState+"] -- "+t+" --> "+("function"==typeof i.methods[o]?i.methods[o].name:i.methods[o])+"(",s,"): ",e),e}if(this.smJHStateMachineLeavingState(this.smState,t,s),this.smDebug("{",this.smState,"} == [",t,"] ==> {",i.state,"}"),this.smState=i.state,n){var h=this.smStates[this.smState].enteringMethods;for(var o in h)try{e.methods.push(h[o]),"function"==typeof h[o]?h[o].call(this,s):this["$"+h[o]](s)}catch(t){throw console.error("Exception in entering ["+this.smState+"] --> "+("function"==typeof h[o]?h[o].name:h[o])+"(",s,"): ",t),t}}for(this.smCurrentEvent=null,this.smJHStateMachineEnteringState(this.smState,t,s),e.toState=this.smState,this.smHistory.splice(0,0,e);this.smHistory.length>50;)this.smHistory.pop()},JHStateMachine.prototype.smPlay=function(){var t=this;this.smPaused&&(this.smPaused=!1,setTimeout(function(){t.smRun()},0))},JHStateMachine.prototype.smPause=function(){this.smPaused=!0},JHStateMachine.prototype.smStep=function(){if(this.smPauseNotified=!1,this.smEventQueue.length>0){var t=this.smEventQueue.shift();this.smHandleEvent(t.event,t.args)}this.smNotifyPause()},JHStateMachine.prototype.smRun=function(){this.smScheduled=!1;for(var t=0;this.smEventQueue.length>0;){if(this.smPaused)return void this.smRunEnd(t);t++,this.smStep()}for(;0==this.smPaused&&this.smEventQueue.length>0;)t++,this.smStep();this.smRunEnd(t)},JHStateMachine.prototype.smRunEnd=function(){},JHStateMachine.prototype.smQueueEvent=function(t,s){var e=this;this.smEventQueue.push({event:t,args:s}),this.smNotifyPause(),this.smScheduled||(this.smScheduled=!0,setTimeout(function(){e.smRun()},0))},JHStateMachine.prototype.smNotifyPause=function(){if(this.smEventQueue.length>0&&1==this.smPaused){var t=this.smEventQueue[0];this.smJHStateMachinePaused(t.event,t.args)}},JHStateMachine.prototype.smJHStateMachineEnteringState=function(t,s,e){},JHStateMachine.prototype.smJHStateMachineLeavingState=function(t,s,e){},JHStateMachine.prototype.smJHStateMachinePaused=function(t,s,e){},JHStateMachine.prototype.smGetTable=function(){var t={};for(var s in this.smStates){var e=this.smStates[s];for(var i in e.transitions){var n=e.transitions[i].state,a=s+"/"+n;if(void 0===t[a]&&(t[a]={}),t[a][i]=[],s!=n)for(var o in e.leavingMethods)t[a][i].push(e.leavingMethods[o]);for(var o in e.transitions[i].methods)t[a][i].push(e.transitions[i].methods[o]);if(s!=n)for(var o in this.smStates[n].enteringMethods)t[a][i].push(this.smStates[n].enteringMethods[o])}}var h=[""];for(var s in this.smStates)h.push("");h.push("");for(var r in this.smStates){h.push("");this.smStates[r];for(var m in this.smStates){var a=(this.smStates[m],r+"/"+m);if(void 0===t[a])h.push("");else{h.push("")}}h.push("")}return h.push("
    "+s+"
    "+r+"");for(var i in t[a]){h.push("
    "),h.push("
    "+i+"
    ");for(var o in t[a][i])h.push("
    "+t[a][i][o]+"
    ");h.push("
    ")}h.push("
    "),h.join("")},JHStateMachine.prototype.smGetHistoryTable=function(){var t=[""];for(var s in this.smHistory){var e=this.smHistory[s];t.push("");var i=new Date(e.date),n=i.getHours()+":"+i.getMinutes()+":"+i.getSeconds()+"."+i.getMilliseconds();t.push(""),t.push(""),t.push(""),t.push(""),t.push(""),t.push("")}return t.push("
    DateToEventMethodsFrom
    "+n+""+e.toState+"
    "+e.event+"
    ("+e.args+")
    ");for(var a in e.methods)t.push(e.methods[a]+"
    ");t.push("
    "+e.fromState+"
    "),t.join("")},JHStateMachine.prototype.smSolveStates=function(t){var s=[];"string"==typeof t&&(t=[t]);for(var e in t){var i=t[e];if(void 0===this.smGroups[i])this.smContained(i,s)||s.push(i);else for(var n in this.smGroups[i])this.smContained(this.smGroups[i][n]),s&&s.push(this.smGroups[i][n])}return s},JHStateMachine.prototype.smContained=function(t,s){for(var e in s)if(t==s[e])return!0;return!1},JHStateMachine.prototype.smCheck=function(){var t={missing:[],unused:[]},s=[];for(var e in this.smStates){for(var i in this.smStates[e].enteringMethods){var n=this.smStates[e].enteringMethods[i];s[n]=!0}for(var i in this.smStates[e].leavingMethods){var n=this.smStates[e].leavingMethods[i];s[n]=!0}for(var a in this.smStates[e].transitions){var o=this.smStates[e].transitions[a];for(var i in o.methods){var n=o.methods[i];s[n]=!0}}}for(var n in s)"function"!=typeof this["$"+n]&&(t.missing.push(n),console.error("JHStateMachine: missing function $",n));for(var h in this)try{if("$"==h[0]&&"function"==typeof this[h]){var n=h.substr(1);void 0===s[n]&&t.unused.push(n)}}catch(a){}return t}; -exports.view=View={Game:{},Board:{}},window.JoclyXdViewCleanup&&window.JoclyXdViewCleanup(),function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1};var i=document.createEvent("Event");return i.initEvent(t,e.bubbles,e.cancelable),i}function e(){console.info.apply(console,arguments)}function i(){}function a(t,e){var i={},o=!1;for(var n in e)if(e.hasOwnProperty(n))if(t.hasOwnProperty(n))if("object"==typeof e[n]){var s=a(t[n],e[n]);s&&(i[n]=s,o=!0)}else e[n]!=t[n]&&(i[n]=e[n],o=!0);else i[n]=e[n],o=!0;return o?i:null}function o(){0==D++&&(M=$(".jocly-res-loading-mask"),0==M.length?M=$("
    ").addClass("jocly-res-loading-mask").css({position:"absolute",top:0,left:0,width:$("body").width(),height:$("body").height(),"background-color":"rgba(0,0,0,.8)","background-image":"url("+O+")","background-position":"center center","background-repeat":"no-repeat","z-index":1e5}).appendTo($("body")):M.show())}function n(){0==--D&&M&&M.hide()}function s(t,e){if(z[t])e(z[t]);else{var i=new THREE.TextureLoader;i.setCrossOrigin("anonymous"),H&&console.log("Loading map",t),o(),i.load(t,function(i){z[t]=i,H&&console.log("Loaded",t),n(),j.animControl.trigger(),e(z[t])},function(t){},function(i){H&&console.log("(not) Loaded",t),n(),j.animControl.trigger(),e(null)})}}function r(t,e){function i(e){r.image=e,H&&console.log("Loaded",t),r.status="loaded",r.imgSrc=p,n();for(var i=0;i0){new THREE.SubdivisionModifier(v).modify(e)}r.status="loaded",n(),r.geometry=e,r.materials=i;for(var a=0;a").attr("type","text/javascript").attr("jocly-type","json-resource").attr("src",h).appendTo($("head"))}else if(/^json2\|/.test(t)){H&&console.log("Loading resource",t),o();var h=/^json2\|(.*)/.exec(t)[1],y=new XMLHttpRequest;y.onreadystatechange=function(){if(y.readyState==XMLHttpRequest.DONE){H&&console.log("Loaded",t);var e=JSON.parse(y.responseText);r.status="loaded",n(),r.data=e;for(var i=0;i0?[t.changedTouches[0].pageX,t.changedTouches[0].pageY]:t.touches&&t.touches.length>0?[t.touches[0].pageX,t.touches[0].pageY]:[t.pageX,t.pageY]}function v(t){if(!!I==!!t)return void console.warn("AR is already",!!t);if(I=t){var e=$("