Merge branch 'mi-g-master'

This commit is contained in:
Timo Ley 2020-07-18 16:39:46 +02:00
commit beb3e37348
10 changed files with 92 additions and 93 deletions

View file

@ -9,13 +9,13 @@ Demos
[Controlled interface](https://mi-g.github.io/jocly/examples/browser/control.html) for playing Chess. [Controlled interface](https://mi-g.github.io/jocly/examples/browser/control.html) for playing Chess.
Click _**Other Jocly games**_ to switch to other games. Click _**Other Jocly games**_ to switch to other games.
Simple human vs computer: [Classic chess](https://mi-g.github.com/jocly/examples/browser/simple.html?classic-chess), Simple human vs computer: [Classic chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=classic-chess),
[Circular chess](https://mi-g.github.com/jocly/examples/browser/simple.html?circular-chess), [Circular chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=circular-chess),
[Multi layers chess](https://mi-g.github.com/jocly/examples/browser/simple.html?raumschach), [Multi layers chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=raumschach),
[Hexagonal chess](https://mi-g.github.com/jocly/examples/browser/simple.html?glinski-chess), [Hexagonal chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=glinski-chess),
[Chinese chess](https://mi-g.github.com/jocly/examples/browser/simple.html?xiangqi), [Chinese chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=xiangqi),
[Middle-age chess](https://mi-g.github.com/jocly/examples/browser/simple.html?courier-chess), [Middle-age chess](https://mi-g.github.com/jocly/examples/browser/simple.html?game=courier-chess),
[Scrum](https://mi-g.github.com/jocly/examples/browser/simple.html?scrum) [Scrum](https://mi-g.github.com/jocly/examples/browser/simple.html?game=scrum)
Or see and try [all available games](https://mi-g.github.com/jocly/examples/browser/multiple.html) Or see and try [all available games](https://mi-g.github.com/jocly/examples/browser/multiple.html)
@ -62,7 +62,7 @@ Building
Notes: Notes:
- using `gulp build watch` instead of `gulp build` makes *gulp* start watching files after the build. Whenever a file is changed, a build is automatically generated - using `gulp build watch` instead of `gulp build` makes *gulp* start watching files after the build. Whenever a file is changed, a build is automatically generated
- you can use `--no-default-games` to prevent including the game modules from directory, and `--modules <colon-separated-directories>` to specify additional game modules to include. For instance, `gulp --no-default-games --modules src/games/chessbase:src/games/checkers build` will only generate distribution for Chess and checkers games - you can use `--no-default-games` to prevent including the game modules from directory, and `--modules <colon-separated-directories>` to specify additional game modules to include. For instance, `gulp --no-default-games --modules src/games/chessbase:src/games/checkers build` will only generate distribution for Chess and checkers games
- you can specify the games to be built in the distribution with the `--games` option. For instance, `gulp --no-default-games --modules src/games --games xiangqi:classic-chess build` only generates Jocly for Classic Chess and XiangQi - you can specify the games to be built in the distribution with the `--games` option. For instance, `gulp --no-default-games --modules src/games/chessbase --games xiangqi:classic-chess build` only generates Jocly for Classic Chess and XiangQi
- using the `no-obsolete` option filters out the games marked as obsolete - using the `no-obsolete` option filters out the games marked as obsolete
API Documentation API Documentation

View file

@ -144,9 +144,9 @@
return [0]; return [0];
else if(piece.t==3) else if(piece.t==3)
return [2]; return [2];
else if(piece.t==0 && geometry.R(move.t)==7) else if(piece.t==0 && (move.t in promo[1]))
return [4,5,6,7]; return [4,5,6,7];
else if(piece.t==2 && geometry.R(move.t)==0) else if(piece.t==2 && (move.t in promo[-1]))
return [4,5,6,7]; return [4,5,6,7];
return []; return [];
}, },
@ -226,4 +226,4 @@
}; };
} }
})(); })();

View file

@ -110,7 +110,7 @@
castle: { castle: {
"0/3": {k:[1,2],r:[2,1],n:"O-O"}, "0/3": {k:[1,2],r:[2,1],n:"O-O"},
"28/31": {k:[30,29],r:[29,30],n:"O-O"}, "28/31": {k:[29,30],r:[30,29],n:"O-O"},
}, },
evaluate: function(aGame,evalValues,material) { evaluate: function(aGame,evalValues,material) {
@ -184,4 +184,4 @@
}; };
} }
})(); })();

View file

@ -148,9 +148,9 @@
return [0]; return [0];
else if(piece.t==3) else if(piece.t==3)
return [2]; return [2];
else if(piece.t==0 && geometry.R(move.t)==7) else if(piece.t==0 && (move.t in promo[1]))
return [4,5,6,7]; return [4,5,6,7];
else if(piece.t==2 && geometry.R(move.t)==0) else if(piece.t==2 && (move.t in promo[-1]))
return [4,5,6,7]; return [4,5,6,7];
return []; return [];
}, },
@ -230,4 +230,4 @@
}; };
} }
})(); })();

View file

@ -8,11 +8,11 @@
5:'a4',16:'b4',26:'c4',37:'d4',47:'e4',58:'f4',69:'g4',81:'h4',92:'i4',104:'k4',115:'l4', 5:'a4',16:'b4',26:'c4',37:'d4',47:'e4',58:'f4',69:'g4',81:'h4',92:'i4',104:'k4',115:'l4',
6:'a5',17:'b5',27:'c5',38:'d5',48:'e5',59:'f5',70:'g5',82:'h5',93:'i5',105:'k5',116:'l5', 6:'a5',17:'b5',27:'c5',38:'d5',48:'e5',59:'f5',70:'g5',82:'h5',93:'i5',105:'k5',116:'l5',
7:'a6',18:'b6',28:'c6',39:'d6',49:'e6',60:'f6',71:'g6',83:'h6',94:'i6',106:'k6',117:'l6', 7:'a6',18:'b6',28:'c6',39:'d6',49:'e6',60:'f6',71:'g6',83:'h6',94:'i6',106:'k6',117:'l6',
19:'b7',29:'c7',40:'d7',50:'e7',61:'f7',72:'g7',84:'h7',95:'i7',107:'k7', 19:'b7',29:'c7',40:'d7',50:'e7',61:'f7',72:'g7',84:'h7',95:'i7',107:'k7',
30:'c8',41:'d8',51:'e8',62:'f8',73:'g8',85:'h8',96:'i8', 30:'c8',41:'d8',51:'e8',62:'f8',73:'g8',85:'h8',96:'i8',
42:'d9',52:'e9',63:'f9',74:'g9',86:'h9', 42:'d9',52:'e9',63:'f9',74:'g9',86:'h9',
53:'e10',64:'f10',75:'g10', 53:'e10',64:'f10',75:'g10',
65:'f11', 65:'f11',
}; };
var geometry = Model.Game.cbBoardGeometryHex([ var geometry = Model.Game.cbBoardGeometryHex([
@ -35,7 +35,7 @@
} }
var promo = { var promo = {
"1": { 7:1, 19:1, 30:1, 53:1, 65:1, 73:1, 86:1, 96:1, 107:1, 117:1 }, "1": { 7:1, 19:1, 30:1, 42:1, 53:1, 65:1, 75:1, 86:1, 96:1, 107:1, 117:1 },
"-1": { 2:1, 13:1, 23:1, 34:1, 44:1, 55:1, 66:1, 78:1, 89:1, 101:1, 112:1 }, "-1": { 2:1, 13:1, 23:1, 34:1, 44:1, 55:1, 66:1, 78:1, 89:1, 101:1, 112:1 },
} }
@ -229,4 +229,4 @@
}; };
} }
})(); })();

View file

@ -5977,7 +5977,7 @@ exports.games = (function () {
"image|/res/fairy/eagle/eagle-normalmap.jpg", "image|/res/fairy/eagle/eagle-normalmap.jpg",
"smoothedfilegeo|0|/res/fairy/camel/camel.js", "smoothedfilegeo|0|/res/fairy/camel/camel.js",
"image|/res/fairy/camel/camel-diffusemap.jpg", "image|/res/fairy/camel/camel-diffusemap.jpg",
"image|/res/fairy/camel/camel-normalmap.jpg" "image|/res/fairy/camel/camel-normalmap.jpg"
], ],
"world": config_view_skins_world, "world": config_view_skins_world,
"camera": config_view_skins_camera "camera": config_view_skins_camera
@ -6511,7 +6511,7 @@ exports.games = (function () {
} }
}, },
"viewScripts": config_view_js_ml "viewScripts": config_view_js_ml
}, },
{ {
"name": "koth-chess", "name": "koth-chess",
"modelScripts": modelScripts_koth, "modelScripts": modelScripts_koth,

View file

@ -1,23 +1,23 @@
/* /*
* Copyright(c) 2013-2017 - jocly.com * Copyright(c) 2013-2017 - jocly.com
* *
* You are allowed to use and modify this source code as long as it is exclusively for use in the Jocly API. * You are allowed to use and modify this source code as long as it is exclusively for use in the Jocly API.
* *
* Original authors: Jocly team * Original authors: Jocly team
* *
*/ */
(function() { (function() {
var geometry = Model.Game.cbBoardGeometryGrid(12,12); var geometry = Model.Game.cbBoardGeometryGrid(12,12);
Model.Game.cbDefine = function() { Model.Game.cbDefine = function() {
var $this = this; var $this = this;
/* /*
* Movement/capture graph for the prince * Movement/capture graph for the prince
*/ */
@ -40,7 +40,7 @@
graph // forward direction graph // forward direction
); );
} }
/* /*
* Movement/capture graph for the eagle * Movement/capture graph for the eagle
*/ */
@ -68,7 +68,7 @@
if(away.length>0) if(away.length>0)
graph[pos].push($this.cbTypedArray(away)); graph[pos].push($this.cbTypedArray(away));
} }
} }
}); });
} }
return $this.cbMergeGraphs(geometry, return $this.cbMergeGraphs(geometry,
@ -76,11 +76,11 @@
graph graph
); );
} }
return { return {
geometry: geometry, geometry: geometry,
pieceTypes: { pieceTypes: {
0: { 0: {
@ -92,7 +92,7 @@
fenAbbrev: 'P', fenAbbrev: 'P',
epCatch: false, epCatch: false,
}, },
1: { 1: {
name: 'ipawn-w', name: 'ipawn-w',
aspect: 'fr-pawn', aspect: 'fr-pawn',
@ -104,7 +104,7 @@
epTarget: true, epTarget: true,
epCatch: false, epCatch: false,
}, },
2: { 2: {
name: 'pawn-b', name: 'pawn-b',
aspect: 'fr-pawn', aspect: 'fr-pawn',
@ -127,7 +127,7 @@
epTarget: true, epTarget: true,
epCatch: false, epCatch: false,
}, },
4: { 4: {
name: 'knight', name: 'knight',
aspect: 'fr-knight', aspect: 'fr-knight',
@ -136,7 +136,7 @@
abbrev: 'N', abbrev: 'N',
initial: [{s:1,p:14},{s:1,p:21},{s:-1,p:122},{s:-1,p:129}], initial: [{s:1,p:14},{s:1,p:21},{s:-1,p:122},{s:-1,p:129}],
}, },
5: { 5: {
name: 'bishop', name: 'bishop',
aspect: 'fr-bishop', aspect: 'fr-bishop',
@ -164,7 +164,7 @@
abbrev: 'Q', abbrev: 'Q',
initial: [{s:1,p:18},{s:-1,p:126}], initial: [{s:1,p:18},{s:-1,p:126}],
}, },
8: { 8: {
name: 'king', name: 'king',
aspect: 'fr-king', aspect: 'fr-king',
@ -173,7 +173,7 @@
abbrev: 'K', abbrev: 'K',
initial: [{s:1,p:17},{s:-1,p:125}], initial: [{s:1,p:17},{s:-1,p:125}],
}, },
9: { 9: {
name: 'cannon', name: 'cannon',
aspect: 'fr-cannon2', aspect: 'fr-cannon2',
@ -182,7 +182,7 @@
abbrev: 'C', abbrev: 'C',
initial: [{s:1,p:0},{s:1,p:11},{s:-1,p:132},{s:-1,p:143}], initial: [{s:1,p:0},{s:1,p:11},{s:-1,p:132},{s:-1,p:143}],
}, },
10: { 10: {
name: 'elephant', name: 'elephant',
aspect: 'fr-elephant', aspect: 'fr-elephant',
@ -190,8 +190,8 @@
value: 2.5, value: 2.5,
abbrev: 'E', abbrev: 'E',
initial: [{s:1,p:12},{s:1,p:23},{s:-1,p:120},{s:-1,p:131}], initial: [{s:1,p:12},{s:1,p:23},{s:-1,p:120},{s:-1,p:131}],
}, },
11: { 11: {
name: 'prince-w', name: 'prince-w',
aspect: 'fr-admiral', aspect: 'fr-admiral',
@ -220,7 +220,7 @@
value: 2, value: 2,
abbrev: 'M', abbrev: 'M',
initial: [{s:1,p:1},{s:1,p:10},{s:-1,p:133},{s:-1,p:142}], initial: [{s:1,p:1},{s:1,p:10},{s:-1,p:133},{s:-1,p:142}],
}, },
14: { 14: {
name: 'lion', name: 'lion',
@ -233,7 +233,7 @@
value: 7.5, value: 7.5,
abbrev: 'L', abbrev: 'L',
initial: [{s:1,p:5},{s:-1,p:137}], initial: [{s:1,p:5},{s:-1,p:137}],
}, },
15: { 15: {
name: 'eagle', name: 'eagle',
aspect: 'fr-eagle', aspect: 'fr-eagle',
@ -267,7 +267,7 @@
value: 14, value: 14,
abbrev: 'D', abbrev: 'D',
initial: [{s:1,p:4},{s:-1,p:136}], initial: [{s:1,p:4},{s:-1,p:136}],
}, },
18: { 18: {
name: 'lighthouse', name: 'lighthouse',
aspect: 'fr-lighthouse', aspect: 'fr-lighthouse',
@ -306,7 +306,7 @@
abbrev: 'Co', abbrev: 'Co',
initial: [{s:1,p:7},{s:-1,p:139}], initial: [{s:1,p:7},{s:-1,p:139}],
}, },
21: { 21: {
name: 'cardinal', name: 'cardinal',
aspect: 'fr-cardinal', aspect: 'fr-cardinal',
@ -330,7 +330,7 @@
castle: true, castle: true,
}, },
}, },
promote: function(aGame,piece,move) { promote: function(aGame,piece,move) {
if(piece.t==1 && geometry.R(move.t)==11) if(piece.t==1 && geometry.R(move.t)==11)
return [14,15,20,16,17,18]; return [14,15,20,16,17,18];
@ -348,7 +348,7 @@
/* /*
* Model.Board.GenerateMoves: * Model.Board.GenerateMoves:
* - handle setup phase * - handle setup phase
* - handle king special move: a kind of castle involving only the king * - handle king special move: a kind of castle involving only the king
*/ */
var kingLongMoves={ var kingLongMoves={
@ -363,7 +363,7 @@
} }
var SuperModelBoardGenerateMoves=Model.Board.GenerateMoves; var SuperModelBoardGenerateMoves=Model.Board.GenerateMoves;
Model.Board.GenerateMoves = function(aGame) { Model.Board.GenerateMoves = function(aGame) {
// first moves (white and black) are managed specifically to setup K,Q,E,L initial position // first moves (white and black) are managed specifically to setup K,Q,E,L initial position
if(this.setupState===undefined) { if(this.setupState===undefined) {
this.mMoves=[{}]; this.mMoves=[{}];
return; return;
@ -415,7 +415,7 @@
} }
} }
} }
/* /*
* Model.Board.CopyFrom overriding to copy setupState property * Model.Board.CopyFrom overriding to copy setupState property
*/ */
@ -424,9 +424,9 @@
SuperModelBoardCopyFrom.apply(this,arguments); SuperModelBoardCopyFrom.apply(this,arguments);
this.setupState = aBoard.setupState; this.setupState = aBoard.setupState;
} }
/* /*
* Model.Board.Evaluate overriding: in setup phase, no evaluation * Model.Board.Evaluate overriding: in setup phase, no evaluation
*/ */
var SuperModelBoardEvaluate = Model.Board.Evaluate; var SuperModelBoardEvaluate = Model.Board.Evaluate;
Model.Board.Evaluate = function(aGame) { Model.Board.Evaluate = function(aGame) {
@ -434,7 +434,7 @@
return; return;
SuperModelBoardEvaluate.apply(this,arguments); SuperModelBoardEvaluate.apply(this,arguments);
} }
/* /*
* Model.Board.ApplyMove overriding: setup phase and king special move * Model.Board.ApplyMove overriding: setup phase and king special move
*/ */
@ -502,7 +502,7 @@
this.board[remaining[-1][queen]]=indexes[-1].Q; this.board[remaining[-1][queen]]=indexes[-1].Q;
piece = this.pieces[indexes[-1].Q]; piece = this.pieces[indexes[-1].Q];
piece.p=remaining[-1][queen]; piece.p=remaining[-1][queen];
$this.zSign=aGame.zobrist.update($this.zSign,"board",piece.t,remaining[-1][queen]); $this.zSign=aGame.zobrist.update($this.zSign,"board",piece.t,remaining[-1][queen]);
remaining[-1].splice(queen,1); remaining[-1].splice(queen,1);
var eagle,lion; var eagle,lion;
setup%=2; setup%=2;
@ -511,7 +511,7 @@
lion=1; lion=1;
} else { } else {
eagle=1; eagle=1;
lion=0; lion=0;
} }
this.board[remaining[1][eagle]]=indexes[1].E; this.board[remaining[1][eagle]]=indexes[1].E;
piece = this.pieces[indexes[1].E]; piece = this.pieces[indexes[1].E];
@ -529,8 +529,8 @@
this.board[remaining[-1][lion]]=indexes[-1].L; this.board[remaining[-1][lion]]=indexes[-1].L;
piece = this.pieces[indexes[-1].L]; piece = this.pieces[indexes[-1].L];
piece.p=remaining[-1][lion]; piece.p=remaining[-1][lion];
$this.zSign=aGame.zobrist.update($this.zSign,"board",piece.t,remaining[1][lion]); $this.zSign=aGame.zobrist.update($this.zSign,"board",piece.t,remaining[1][lion]);
this.setupState="done"; this.setupState="done";
} else } else
SuperModelBoardApplyMove.apply(this,arguments); SuperModelBoardApplyMove.apply(this,arguments);
@ -549,11 +549,11 @@
} }
return SuperModelMoveToString.apply(this,arguments); return SuperModelMoveToString.apply(this,arguments);
} }
/* /*
* Model.Board.CompactMoveString overriding to help reading PJN game transcripts * Model.Board.CompactMoveString overriding to help reading PJN game transcripts
*/ */
var SuperModelBoardCompactMoveString = Model.Board.CompactMoveString; var SuperModelBoardCompactMoveString = Model.Board.CompactMoveString;
Model.Board.CompactMoveString = function(aGame,aMove,allMoves) { Model.Board.CompactMoveString = function(aGame,aMove,allMoves) {
if(typeof aMove.ToString!="function") // ensure proper move object, if necessary if(typeof aMove.ToString!="function") // ensure proper move object, if necessary
aMove=aGame.CreateMove(aMove); aMove=aGame.CreateMove(aMove);
@ -570,5 +570,5 @@
return [aGame.CreateMove({setup:Math.floor(Math.random()*12)})]; return [aGame.CreateMove({setup:Math.floor(Math.random()*12)})];
return null; return null;
} }
})(); })();

View file

@ -1,26 +1,26 @@
/* /*
* Copyright(c) 2013-2017 - jocly.com * Copyright(c) 2013-2017 - jocly.com
* *
* You are allowed to use and modify this source code as long as it is exclusively for use in the Jocly API. * You are allowed to use and modify this source code as long as it is exclusively for use in the Jocly API.
* *
* Original authors: Jocly team * Original authors: Jocly team
* *
*/ */
(function() { (function() {
View.Game.cbDefineView = function() { View.Game.cbDefineView = function() {
var metamachyBoardDelta = { var metamachyBoardDelta = {
//notationMode: 'in', //notationMode: 'in',
//notationDebug: true, //notationDebug: true,
}; };
var metamachyBoard3d = $.extend(true,{},this.cbGridBoardClassic3DMargin,metamachyBoardDelta); var metamachyBoard3d = $.extend(true,{},this.cbGridBoardClassic3DMargin,metamachyBoardDelta);
var metamachyBoard2d = $.extend(true,{},this.cbGridBoardClassic2DNoMargin,metamachyBoardDelta); var metamachyBoard2d = $.extend(true,{},this.cbGridBoardClassic2DNoMargin,metamachyBoardDelta);
return { return {
coords: { coords: {
"2d": this.cbGridBoard.coordsFn.call(this,metamachyBoard2d), "2d": this.cbGridBoard.coordsFn.call(this,metamachyBoard2d),
@ -42,10 +42,10 @@
], ],
board: { board: {
"2d": { "2d": {
draw: this.cbDrawBoardFn(metamachyBoard2d), draw: this.cbDrawBoardFn(metamachyBoard2d),
}, },
"3d": { "3d": {
display: this.cbDisplayBoardFn(metamachyBoard3d), display: this.cbDisplayBoardFn(metamachyBoard3d),
}, },
}, },
clicker: { clicker: {
@ -71,8 +71,8 @@
}; };
} }
/* /*
* Make the knight & the camel jump when moving, the elephant & the lion when moving 2 squares, the cannon when capturing * Make the knight & the camel jump when moving, the elephant & the lion when moving 2 squares, the cannon when capturing
*/ */
View.Board.cbMoveMidZ = function(aGame,aMove,zFrom,zTo) { View.Board.cbMoveMidZ = function(aGame,aMove,zFrom,zTo) {
if(aMove.a=='N' || aMove.a=='M' || (aMove.a=='E' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='L' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='K' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='C' && aMove.c!=null)) if(aMove.a=='N' || aMove.a=='M' || (aMove.a=='E' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='L' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='K' && aGame.g.distGraph[aMove.f][aMove.t]==2) || (aMove.a=='C' && aMove.c!=null))
@ -82,7 +82,7 @@
} }
/* /*
* View.Game.xdInit overriding to create initial setup gadgets * View.Game.xdInit overriding to create initial setup gadgets
*/ */
var SuperViewGameXdInit = View.Game.xdInit; var SuperViewGameXdInit = View.Game.xdInit;
View.Game.xdInit = function(xdv) { View.Game.xdInit = function(xdv) {
@ -145,11 +145,11 @@
}); });
} }
}, },
}); });
})(setup); })(setup);
} }
} }
/* /*
* View.Board.xdInput overriding to handle setup phase * View.Board.xdInput overriding to handle setup phase
*/ */
@ -165,7 +165,7 @@
initial: { initial: {
setupDone: false, setupDone: false,
}, },
getActions: function(moves,currentInput) { getActions: function(moves,currentInput) {
var actions={}; var actions={};
if(!currentInput.setupDone) { if(!currentInput.setupDone) {
moves.forEach(function(move) { moves.forEach(function(move) {
@ -184,7 +184,7 @@
} else } else
return SuperViewBoardxdInput.apply(this,arguments); return SuperViewBoardxdInput.apply(this,arguments);
} }
/* /*
* View.Board.cbAnimate overriding to prevent animation on setup * View.Board.cbAnimate overriding to prevent animation on setup
*/ */
@ -195,7 +195,7 @@
else else
SuperViewBoardcbAnimate.apply(this,arguments); SuperViewBoardcbAnimate.apply(this,arguments);
} }
/* /*
* View.Board.xdDisplay overriding to prevent displaying KQEL before setup * View.Board.xdDisplay overriding to prevent displaying KQEL before setup
*/ */
@ -211,10 +211,9 @@
}); });
SuperViewBoardxdDisplay.apply(this,arguments); SuperViewBoardxdDisplay.apply(this,arguments);
for(var pos in hidden) for(var pos in hidden)
this.pieces[hidden[pos]].p=parseInt(pos); this.pieces[hidden[pos]].p=parseInt(pos);
} else } else
SuperViewBoardxdDisplay.apply(this,arguments); SuperViewBoardxdDisplay.apply(this,arguments);
} }
})();
})();

View file

@ -111,8 +111,8 @@
}, },
castle: { castle: {
"2/0": {k:[1],r:[1],n:"O-O"}, "2/0": {k:[1],r:[1,2],n:"O-O"},
"22/20": {k:[21],r:[21],n:"O-O"}, "22/20": {k:[21],r:[21,22],n:"O-O"},
}, },
evaluate: function(aGame,evalValues,material) { evaluate: function(aGame,evalValues,material) {
@ -186,4 +186,4 @@
}; };
} }
})(); })();

View file

@ -8,11 +8,11 @@
5:'a4',16:'b4',26:'c4',37:'d4',47:'e4',58:'f4',69:'g4',81:'h4',92:'i4',104:'k4',115:'l4', 5:'a4',16:'b4',26:'c4',37:'d4',47:'e4',58:'f4',69:'g4',81:'h4',92:'i4',104:'k4',115:'l4',
6:'a5',17:'b5',27:'c5',38:'d5',48:'e5',59:'f5',70:'g5',82:'h5',93:'i5',105:'k5',116:'l5', 6:'a5',17:'b5',27:'c5',38:'d5',48:'e5',59:'f5',70:'g5',82:'h5',93:'i5',105:'k5',116:'l5',
7:'a6',18:'b6',28:'c6',39:'d6',49:'e6',60:'f6',71:'g6',83:'h6',94:'i6',106:'k6',117:'l6', 7:'a6',18:'b6',28:'c6',39:'d6',49:'e6',60:'f6',71:'g6',83:'h6',94:'i6',106:'k6',117:'l6',
19:'b7',29:'c7',40:'d7',50:'e7',61:'f7',72:'g7',84:'h7',95:'i7',107:'k7', 19:'b7',29:'c7',40:'d7',50:'e7',61:'f7',72:'g7',84:'h7',95:'i7',107:'k7',
30:'c8',41:'d8',51:'e8',62:'f8',73:'g8',85:'h8',96:'i8', 30:'c8',41:'d8',51:'e8',62:'f8',73:'g8',85:'h8',96:'i8',
42:'d9',52:'e9',63:'f9',74:'g9',86:'h9', 42:'d9',52:'e9',63:'f9',74:'g9',86:'h9',
53:'e10',64:'f10',75:'g10', 53:'e10',64:'f10',75:'g10',
65:'f11', 65:'f11',
}; };
var geometry = Model.Game.cbBoardGeometryHex([ var geometry = Model.Game.cbBoardGeometryHex([
@ -30,7 +30,7 @@
],posNames); ],posNames);
var promo = { var promo = {
"1": { 7:1, 19:1, 30:1, 53:1, 65:1, 73:1, 86:1, 96:1, 107:1, 117:1 }, "1": { 7:1, 19:1, 30:1, 42:1, 53:1, 65:1, 75:1, 86:1, 96:1, 107:1, 117:1 },
"-1": { 2:1, 13:1, 23:1, 34:1, 44:1, 55:1, 66:1, 78:1, 89:1, 101:1, 112:1 }, "-1": { 2:1, 13:1, 23:1, 34:1, 44:1, 55:1, 66:1, 78:1, 89:1, 101:1, 112:1 },
} }
@ -226,4 +226,4 @@
}; };
} }
})(); })();