add variants
|
@ -0,0 +1,175 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
var geometry = Model.Game.cbBoardGeometryGrid(8,8);
|
||||
|
||||
Model.Game.cbDefine = function() {
|
||||
|
||||
return {
|
||||
|
||||
geometry: geometry,
|
||||
|
||||
pieceTypes: {
|
||||
|
||||
0: {
|
||||
name: 'pawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
1: {
|
||||
name: 'ipawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:1,p:8},{s:1,p:9},{s:1,p:10},{s:1,p:11},{s:1,p:12},{s:1,p:13},{s:1,p:14},{s:1,p:15}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
2: {
|
||||
name: 'pawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
3: {
|
||||
name: 'ipawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:-1,p:48},{s:-1,p:49},{s:-1,p:50},{s:-1,p:51},{s:-1,p:52},{s:-1,p:53},{s:-1,p:54},{s:-1,p:55}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
4: {
|
||||
name: 'knight',
|
||||
aspect: 'fr-knight',
|
||||
graph: this.cbKnightGraph(geometry),
|
||||
value: 2.9,
|
||||
abbrev: 'N',
|
||||
initial: [{s:1,p:1},{s:1,p:6}],
|
||||
},
|
||||
|
||||
5: {
|
||||
name: 'bishop',
|
||||
aspect: 'fr-bishop',
|
||||
graph: this.cbBishopGraph(geometry),
|
||||
value: 3.1,
|
||||
abbrev: 'B',
|
||||
initial: [{s:1,p:2},{s:1,p:5}],
|
||||
},
|
||||
|
||||
6: {
|
||||
name: 'rook',
|
||||
aspect: 'fr-rook',
|
||||
graph: this.cbRookGraph(geometry),
|
||||
value: 5,
|
||||
abbrev: 'R',
|
||||
initial: [{s:1,p:0},{s:1,p:7}],
|
||||
castle: true,
|
||||
},
|
||||
|
||||
7: {
|
||||
name: 'queen',
|
||||
aspect: 'fr-queen',
|
||||
graph: this.cbQueenGraph(geometry),
|
||||
value: 8,
|
||||
abbrev: 'A',
|
||||
initial: [{s:1,p:3}],
|
||||
},
|
||||
|
||||
8: {
|
||||
name: 'king',
|
||||
aspect: 'fr-king',
|
||||
isKing: true,
|
||||
graph: this.cbKingGraph(geometry),
|
||||
abbrev: 'K',
|
||||
initial: [{s:1,p:4},{s:-1,p:60}],
|
||||
},
|
||||
9: {
|
||||
name: 'chancellor',
|
||||
aspect: 'fr-marshall',
|
||||
graph: this.cbMergeGraphs(geometry,
|
||||
this.cbRookGraph(geometry),
|
||||
this.cbKnightGraph(geometry)),
|
||||
value: 5,
|
||||
abbrev: 'Cc',
|
||||
initial: [{s:-1,p:58},{s:-1,p:61}],
|
||||
},
|
||||
10: {
|
||||
name: 'cardinal',
|
||||
aspect: 'fr-cardinal',
|
||||
graph: this.cbMergeGraphs(geometry,
|
||||
this.cbBishopGraph(geometry),
|
||||
this.cbKnightGraph(geometry)),
|
||||
value: 5,
|
||||
abbrev: 'Ad',
|
||||
initial: [{s:-1,p:59}],
|
||||
castle: true,
|
||||
},
|
||||
11: {
|
||||
name : 'elephant',
|
||||
abbrev : 'E',
|
||||
aspect : 'fr-elephant',
|
||||
graph : this.cbShortRangeGraph(geometry,[[-1,-1],[-1,1],[1,-1],[1,1],[-2,-2],[-2,2],[2,-2],[2,2]],),
|
||||
value : 2,
|
||||
initial: [{s:-1,p:57},{s:-1,p:62}],
|
||||
},
|
||||
12: {
|
||||
name : 'crownedrook',
|
||||
abbrev : 'Ib',
|
||||
aspect : 'fr-crowned-rook',
|
||||
graph : this.cbMergeGraphs(geometry,
|
||||
this.cbBishopGraph(geometry),
|
||||
this.cbShortRangeGraph(geometry,[[-1,0],[-2,0],[1,0],[2,0],[0,1],[0,2],[0,-1],[0,-2]])),
|
||||
value : 2.2,
|
||||
initial: [{s:-1,p:56},{s:-1,p:63}],
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
promote: function(aGame,piece,move) {
|
||||
if(piece.t==1)
|
||||
return [0];
|
||||
else if(piece.t==3)
|
||||
return [2];
|
||||
else if(piece.t==0 && geometry.R(move.t)==7)
|
||||
return [4,5,6,7];
|
||||
else if(piece.t==2 && geometry.R(move.t)==0)
|
||||
return [9,10,11,12];
|
||||
return [];
|
||||
},
|
||||
|
||||
castle: {
|
||||
"4/0": {k:[3,2],r:[1,2,3],n:"O-O-O"},
|
||||
"4/7": {k:[5,6],r:[6,5],n:"O-O"},
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
View.Game.cbDefineView = function() {
|
||||
|
||||
var orthoBoardDelta = {
|
||||
// notationMode: 'in',
|
||||
// notationDebug: true,
|
||||
};
|
||||
var orthoBoard3d = $.extend(true,{},this.cbGridBoardClassic3DMargin,orthoBoardDelta);
|
||||
var orthoBoard2d = $.extend(true,{},this.cbGridBoardClassic2DNoMargin,orthoBoardDelta);
|
||||
|
||||
return {
|
||||
coords: {
|
||||
"2d": this.cbGridBoard.coordsFn.call(this,orthoBoard2d),
|
||||
"3d": this.cbGridBoard.coordsFn.call(this,orthoBoard3d),
|
||||
},
|
||||
boardLayout: [
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
],
|
||||
|
||||
board: {
|
||||
"2d": {
|
||||
draw: this.cbDrawBoardFn(orthoBoard2d),
|
||||
},
|
||||
"3d": {
|
||||
display: this.cbDisplayBoardFn(orthoBoard3d),
|
||||
},
|
||||
},
|
||||
clicker: {
|
||||
"2d": {
|
||||
width: 1500,
|
||||
height: 1500,
|
||||
},
|
||||
"3d": {
|
||||
scale: [.75,.75,.75],
|
||||
},
|
||||
},
|
||||
pieces: this.cbFairyPieceStyle({
|
||||
"default": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.5],
|
||||
},
|
||||
"2d": {
|
||||
width: 1300,
|
||||
height: 1300,
|
||||
},
|
||||
},
|
||||
"fr-amazon": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.6],
|
||||
},
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
/* Make the knight and amazon jump when leaping */
|
||||
View.Board.cbMoveMidZ = function(aGame,aMove,zFrom,zTo) {
|
||||
var geometry = aGame.cbVar.geometry;
|
||||
var x0 = geometry.C(aMove.f);
|
||||
var x1 = geometry.C(aMove.t);
|
||||
var y0 = geometry.R(aMove.f);
|
||||
var y1 = geometry.R(aMove.t);
|
||||
if(x1-x0==0 || y1-y0==0 || Math.abs(x1-x0)==Math.abs(y1-y0))
|
||||
return (zFrom+zTo)/2;
|
||||
else
|
||||
return Math.max(zFrom,zTo)+1500;
|
||||
}
|
||||
|
||||
|
||||
})();
|
|
@ -1207,6 +1207,39 @@ exports.games = (function () {
|
|||
"fairy-set-view.js",
|
||||
"leychessbeta-view.js"
|
||||
]
|
||||
var modelScripts_fc = [
|
||||
"base-model.js",
|
||||
"grid-geo-model.js",
|
||||
"fairychess-model.js"
|
||||
]
|
||||
var config_view_js_fc = [
|
||||
"base-view.js",
|
||||
"grid-board-view.js",
|
||||
"fairy-set-view.js",
|
||||
"fairychess-view.js"
|
||||
]
|
||||
var modelScripts_ml = [
|
||||
"base-model.js",
|
||||
"grid-geo-model.js",
|
||||
"mightylion-model.js"
|
||||
]
|
||||
var config_view_js_ml = [
|
||||
"base-view.js",
|
||||
"grid-board-view.js",
|
||||
"fairy-set-view.js",
|
||||
"mightylion-view.js"
|
||||
]
|
||||
var modelScripts_km = [
|
||||
"base-model.js",
|
||||
"grid-geo-model.js",
|
||||
"knightmate-model.js"
|
||||
]
|
||||
var config_view_js_km = [
|
||||
"base-view.js",
|
||||
"grid-board-view.js",
|
||||
"fairy-set-view.js",
|
||||
"knightmate-view.js"
|
||||
]
|
||||
return [
|
||||
{
|
||||
"name": "classic-chess",
|
||||
|
@ -5131,11 +5164,11 @@ exports.games = (function () {
|
|||
"title-en": "LeyChessAlpha",
|
||||
"summary": "Chess on 12x12 with fairy pieces",
|
||||
"rules": {
|
||||
"en": "metamachy-rules.html"
|
||||
"en": "leychessalpha-rules.html"
|
||||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "metamachy-thumb.png",
|
||||
"thumbnail": "leychessalpha-thumb.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "leychessalpha-credits.html"
|
||||
|
@ -5379,7 +5412,7 @@ exports.games = (function () {
|
|||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "knight-thumbnail.png",
|
||||
"thumbnail": "armychess-thumb.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "army-credits.html"
|
||||
|
@ -5501,7 +5534,7 @@ exports.games = (function () {
|
|||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "knight-thumbnail.png",
|
||||
"thumbnail": "4board-thumb.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "4board-credits.html"
|
||||
|
@ -6101,7 +6134,373 @@ exports.games = (function () {
|
|||
}
|
||||
},
|
||||
"viewScripts": config_view_js_lcb
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "knightmate-chess",
|
||||
"modelScripts": modelScripts_km,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Knight Mate",
|
||||
"summary": "Knight and King changed the role.",
|
||||
"rules": {
|
||||
"en": "knightmate-rules.html"
|
||||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "knight-thumbnail.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "knightmate-credits.html"
|
||||
},
|
||||
"gameOptions": config_model_gameOptions,
|
||||
"obsolete": false,
|
||||
"js": modelScripts_km,
|
||||
"description": {
|
||||
"en": "knightmate-description.html"
|
||||
},
|
||||
"levels": config_model_levels_10
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Chessbase view",
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/knightmate-600x600-3d.jpg",
|
||||
"res/visuals/knightmate-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"xdView": true,
|
||||
"css": config_view_css,
|
||||
"preferredRatio": 1,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"module": "chessbase",
|
||||
"defaultOptions": config_view_defaultOptions,
|
||||
"skins": [
|
||||
{
|
||||
"name": "skin3d",
|
||||
"title": "3D Classic",
|
||||
"3d": true,
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/ring-target.js",
|
||||
"image|/res/images/cancel.png",
|
||||
"image|/res/images/wikipedia.png",
|
||||
"smoothedfilegeo|0|/res/fairy/pawn/pawn.js",
|
||||
"image|/res/fairy/pawn/pawn-diffusemap.jpg",
|
||||
"image|/res/fairy/pawn/pawn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/knight/knight.js",
|
||||
"image|/res/fairy/knight/knight-diffusemap.jpg",
|
||||
"image|/res/fairy/knight/knight-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/bishop/bishop.js",
|
||||
"image|/res/fairy/bishop/bishop-diffusemap.jpg",
|
||||
"image|/res/fairy/bishop/bishop-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/queen/queen.js",
|
||||
"image|/res/fairy/queen/queen-diffusemap.jpg",
|
||||
"image|/res/fairy/queen/queen-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/king/king.js",
|
||||
"image|/res/fairy/king/king-diffusemap.jpg",
|
||||
"image|/res/fairy/king/king-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/rook/rook.js",
|
||||
"image|/res/fairy/rook/rook-diffusemap.jpg",
|
||||
"image|/res/fairy/rook/rook-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cannon2/cannon2.js",
|
||||
"image|/res/fairy/cannon2/cannon2-diffusemap.jpg",
|
||||
"image|/res/fairy/cannon2/cannon2-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/elephant/elephant.js",
|
||||
"image|/res/fairy/elephant/elephant-diffusemap.jpg",
|
||||
"image|/res/fairy/elephant/elephant-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/admiral/admiral.js",
|
||||
"image|/res/fairy/admiral/admiral-diffusemap.jpg",
|
||||
"image|/res/fairy/admiral/admiral-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/camel/camel.js",
|
||||
"image|/res/fairy/camel/camel-diffusemap.jpg",
|
||||
"image|/res/fairy/camel/camel-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lion/lion.js",
|
||||
"image|/res/fairy/lion/lion-diffusemap.jpg",
|
||||
"image|/res/fairy/lion/lion-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/eagle/eagle.js",
|
||||
"image|/res/fairy/eagle/eagle-diffusemap.jpg",
|
||||
"image|/res/fairy/eagle/eagle-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/unicorn/unicorn.js",
|
||||
"image|/res/fairy/unicorn/unicorn-diffusemap.jpg",
|
||||
"image|/res/fairy/unicorn/unicorn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lighthouse/lighthouse.js",
|
||||
"image|/res/fairy/lighthouse/lighthouse-diffusemap.jpg",
|
||||
"image|/res/fairy/lighthouse/lighthouse-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/amazon/amazon.js",
|
||||
"image|/res/fairy/amazon/amazon-diffusemap.jpg",
|
||||
"image|/res/fairy/amazon/amazon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cardinal/cardinal.js",
|
||||
"image|/res/fairy/cardinal/cardinal-diffusemap.jpg",
|
||||
"image|/res/fairy/cardinal/cardinal-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/marshall/marshall.js",
|
||||
"image|/res/fairy/marshall/marshall-diffusemap.jpg",
|
||||
"image|/res/fairy/marshall/marshall-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/dragon/dragon.js",
|
||||
"image|/res/fairy/dragon/dragon-diffusemap.jpg",
|
||||
"image|/res/fairy/dragon/dragon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/crowned-rook/crowned-rook.js",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-diffusemap.jpg",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-normalmap.jpg",
|
||||
],
|
||||
"world": config_view_skins_world,
|
||||
"camera": config_view_skins_camera
|
||||
},
|
||||
config_view_skins_9
|
||||
],
|
||||
"animateSelfMoves": false,
|
||||
"switchable": true,
|
||||
"sounds": config_view_sounds,
|
||||
"js": config_view_js_km,
|
||||
"useAutoComplete": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js_km
|
||||
},
|
||||
{
|
||||
"name": "fairy-chess",
|
||||
"modelScripts": modelScripts_fc,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Fairy Chess",
|
||||
"summary": "Chess with Fairy Pieces",
|
||||
"rules": {
|
||||
"en": "fairychess-rules.html"
|
||||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "fairychess-thumb.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "fairychess-credits.html"
|
||||
},
|
||||
"gameOptions": config_model_gameOptions,
|
||||
"obsolete": false,
|
||||
"js": modelScripts_fc,
|
||||
"description": {
|
||||
"en": "fairychess-description.html"
|
||||
},
|
||||
"levels": config_model_levels_10
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Chessbase view",
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/fairychess-600x600-3d.jpg",
|
||||
"res/visuals/fairychess-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"xdView": true,
|
||||
"css": config_view_css,
|
||||
"preferredRatio": 1,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"module": "chessbase",
|
||||
"defaultOptions": config_view_defaultOptions,
|
||||
"skins": [
|
||||
{
|
||||
"name": "skin3d",
|
||||
"title": "3D Classic",
|
||||
"3d": true,
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/ring-target.js",
|
||||
"image|/res/images/cancel.png",
|
||||
"image|/res/images/wikipedia.png",
|
||||
"smoothedfilegeo|0|/res/fairy/pawn/pawn.js",
|
||||
"image|/res/fairy/pawn/pawn-diffusemap.jpg",
|
||||
"image|/res/fairy/pawn/pawn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/knight/knight.js",
|
||||
"image|/res/fairy/knight/knight-diffusemap.jpg",
|
||||
"image|/res/fairy/knight/knight-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/bishop/bishop.js",
|
||||
"image|/res/fairy/bishop/bishop-diffusemap.jpg",
|
||||
"image|/res/fairy/bishop/bishop-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/queen/queen.js",
|
||||
"image|/res/fairy/queen/queen-diffusemap.jpg",
|
||||
"image|/res/fairy/queen/queen-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/king/king.js",
|
||||
"image|/res/fairy/king/king-diffusemap.jpg",
|
||||
"image|/res/fairy/king/king-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/rook/rook.js",
|
||||
"image|/res/fairy/rook/rook-diffusemap.jpg",
|
||||
"image|/res/fairy/rook/rook-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cannon2/cannon2.js",
|
||||
"image|/res/fairy/cannon2/cannon2-diffusemap.jpg",
|
||||
"image|/res/fairy/cannon2/cannon2-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/elephant/elephant.js",
|
||||
"image|/res/fairy/elephant/elephant-diffusemap.jpg",
|
||||
"image|/res/fairy/elephant/elephant-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/admiral/admiral.js",
|
||||
"image|/res/fairy/admiral/admiral-diffusemap.jpg",
|
||||
"image|/res/fairy/admiral/admiral-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/camel/camel.js",
|
||||
"image|/res/fairy/camel/camel-diffusemap.jpg",
|
||||
"image|/res/fairy/camel/camel-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lion/lion.js",
|
||||
"image|/res/fairy/lion/lion-diffusemap.jpg",
|
||||
"image|/res/fairy/lion/lion-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/eagle/eagle.js",
|
||||
"image|/res/fairy/eagle/eagle-diffusemap.jpg",
|
||||
"image|/res/fairy/eagle/eagle-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/unicorn/unicorn.js",
|
||||
"image|/res/fairy/unicorn/unicorn-diffusemap.jpg",
|
||||
"image|/res/fairy/unicorn/unicorn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lighthouse/lighthouse.js",
|
||||
"image|/res/fairy/lighthouse/lighthouse-diffusemap.jpg",
|
||||
"image|/res/fairy/lighthouse/lighthouse-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/amazon/amazon.js",
|
||||
"image|/res/fairy/amazon/amazon-diffusemap.jpg",
|
||||
"image|/res/fairy/amazon/amazon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cardinal/cardinal.js",
|
||||
"image|/res/fairy/cardinal/cardinal-diffusemap.jpg",
|
||||
"image|/res/fairy/cardinal/cardinal-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/marshall/marshall.js",
|
||||
"image|/res/fairy/marshall/marshall-diffusemap.jpg",
|
||||
"image|/res/fairy/marshall/marshall-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/dragon/dragon.js",
|
||||
"image|/res/fairy/dragon/dragon-diffusemap.jpg",
|
||||
"image|/res/fairy/dragon/dragon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/crowned-rook/crowned-rook.js",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-diffusemap.jpg",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-normalmap.jpg",
|
||||
],
|
||||
"world": config_view_skins_world,
|
||||
"camera": config_view_skins_camera
|
||||
},
|
||||
config_view_skins_9
|
||||
],
|
||||
"animateSelfMoves": false,
|
||||
"switchable": true,
|
||||
"sounds": config_view_sounds,
|
||||
"js": config_view_js_fc,
|
||||
"useAutoComplete": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js_fc
|
||||
},
|
||||
{
|
||||
"name": "mightylion-chess",
|
||||
"modelScripts": modelScripts_ml,
|
||||
"config": {
|
||||
"status": true,
|
||||
"model": {
|
||||
"title-en": "Mighty Lion",
|
||||
"summary": "Chess with a Lion",
|
||||
"rules": {
|
||||
"en": "mightylion-rules.html"
|
||||
},
|
||||
"module": "chessbase",
|
||||
"plazza": "true",
|
||||
"thumbnail": "mightylion-thumb.png",
|
||||
"released": 1402412178,
|
||||
"credits": {
|
||||
"en": "mightylion-credits.html"
|
||||
},
|
||||
"gameOptions": config_model_gameOptions,
|
||||
"obsolete": false,
|
||||
"js": modelScripts_ml,
|
||||
"description": {
|
||||
"en": "mightylion-description.html"
|
||||
},
|
||||
"levels": config_model_levels_10
|
||||
},
|
||||
"view": {
|
||||
"title-en": "Chessbase view",
|
||||
"visuals": {
|
||||
"600x600": [
|
||||
"res/visuals/mightylion-600x600-3d.jpg",
|
||||
"res/visuals/mightylion-600x600-2d.jpg"
|
||||
]
|
||||
},
|
||||
"xdView": true,
|
||||
"css": config_view_css,
|
||||
"preferredRatio": 1,
|
||||
"useShowMoves": true,
|
||||
"useNotation": true,
|
||||
"module": "chessbase",
|
||||
"defaultOptions": config_view_defaultOptions,
|
||||
"skins": [
|
||||
{
|
||||
"name": "skin3d",
|
||||
"title": "3D Classic",
|
||||
"3d": true,
|
||||
"preload": [
|
||||
"smoothedfilegeo|0|/res/ring-target.js",
|
||||
"image|/res/images/cancel.png",
|
||||
"image|/res/images/wikipedia.png",
|
||||
"smoothedfilegeo|0|/res/fairy/pawn/pawn.js",
|
||||
"image|/res/fairy/pawn/pawn-diffusemap.jpg",
|
||||
"image|/res/fairy/pawn/pawn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/knight/knight.js",
|
||||
"image|/res/fairy/knight/knight-diffusemap.jpg",
|
||||
"image|/res/fairy/knight/knight-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/bishop/bishop.js",
|
||||
"image|/res/fairy/bishop/bishop-diffusemap.jpg",
|
||||
"image|/res/fairy/bishop/bishop-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/queen/queen.js",
|
||||
"image|/res/fairy/queen/queen-diffusemap.jpg",
|
||||
"image|/res/fairy/queen/queen-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/king/king.js",
|
||||
"image|/res/fairy/king/king-diffusemap.jpg",
|
||||
"image|/res/fairy/king/king-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/rook/rook.js",
|
||||
"image|/res/fairy/rook/rook-diffusemap.jpg",
|
||||
"image|/res/fairy/rook/rook-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cannon2/cannon2.js",
|
||||
"image|/res/fairy/cannon2/cannon2-diffusemap.jpg",
|
||||
"image|/res/fairy/cannon2/cannon2-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/elephant/elephant.js",
|
||||
"image|/res/fairy/elephant/elephant-diffusemap.jpg",
|
||||
"image|/res/fairy/elephant/elephant-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/admiral/admiral.js",
|
||||
"image|/res/fairy/admiral/admiral-diffusemap.jpg",
|
||||
"image|/res/fairy/admiral/admiral-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/camel/camel.js",
|
||||
"image|/res/fairy/camel/camel-diffusemap.jpg",
|
||||
"image|/res/fairy/camel/camel-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lion/lion.js",
|
||||
"image|/res/fairy/lion/lion-diffusemap.jpg",
|
||||
"image|/res/fairy/lion/lion-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/eagle/eagle.js",
|
||||
"image|/res/fairy/eagle/eagle-diffusemap.jpg",
|
||||
"image|/res/fairy/eagle/eagle-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/unicorn/unicorn.js",
|
||||
"image|/res/fairy/unicorn/unicorn-diffusemap.jpg",
|
||||
"image|/res/fairy/unicorn/unicorn-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/lighthouse/lighthouse.js",
|
||||
"image|/res/fairy/lighthouse/lighthouse-diffusemap.jpg",
|
||||
"image|/res/fairy/lighthouse/lighthouse-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/amazon/amazon.js",
|
||||
"image|/res/fairy/amazon/amazon-diffusemap.jpg",
|
||||
"image|/res/fairy/amazon/amazon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/cardinal/cardinal.js",
|
||||
"image|/res/fairy/cardinal/cardinal-diffusemap.jpg",
|
||||
"image|/res/fairy/cardinal/cardinal-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/marshall/marshall.js",
|
||||
"image|/res/fairy/marshall/marshall-diffusemap.jpg",
|
||||
"image|/res/fairy/marshall/marshall-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/dragon/dragon.js",
|
||||
"image|/res/fairy/dragon/dragon-diffusemap.jpg",
|
||||
"image|/res/fairy/dragon/dragon-normalmap.jpg",
|
||||
"smoothedfilegeo|0|/res/fairy/crowned-rook/crowned-rook.js",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-diffusemap.jpg",
|
||||
"image|/res/fairy/crowned-rook/crowned-rook-normalmap.jpg",
|
||||
],
|
||||
"world": config_view_skins_world,
|
||||
"camera": config_view_skins_camera
|
||||
},
|
||||
config_view_skins_9
|
||||
],
|
||||
"animateSelfMoves": false,
|
||||
"switchable": true,
|
||||
"sounds": config_view_sounds,
|
||||
"js": config_view_js_ml,
|
||||
"useAutoComplete": true
|
||||
}
|
||||
},
|
||||
"viewScripts": config_view_js_ml
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
var geometry = Model.Game.cbBoardGeometryGrid(8,8);
|
||||
|
||||
Model.Game.cbDefine = function() {
|
||||
|
||||
return {
|
||||
|
||||
geometry: geometry,
|
||||
|
||||
pieceTypes: {
|
||||
|
||||
0: {
|
||||
name: 'pawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
1: {
|
||||
name: 'ipawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:1,p:8},{s:1,p:9},{s:1,p:10},{s:1,p:11},{s:1,p:12},{s:1,p:13},{s:1,p:14},{s:1,p:15}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
2: {
|
||||
name: 'pawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
3: {
|
||||
name: 'ipawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:-1,p:48},{s:-1,p:49},{s:-1,p:50},{s:-1,p:51},{s:-1,p:52},{s:-1,p:53},{s:-1,p:54},{s:-1,p:55}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
4: {
|
||||
name: 'knight',
|
||||
aspect: 'fr-admiral',
|
||||
graph: this.cbKingGraph(geometry),
|
||||
value: 2.9,
|
||||
abbrev: 'N',
|
||||
initial: [{s:1,p:1},{s:1,p:6},{s:-1,p:57},{s:-1,p:62}],
|
||||
},
|
||||
|
||||
5: {
|
||||
name: 'bishop',
|
||||
aspect: 'fr-bishop',
|
||||
graph: this.cbBishopGraph(geometry),
|
||||
value: 3.1,
|
||||
abbrev: 'B',
|
||||
initial: [{s:1,p:2},{s:1,p:5},{s:-1,p:58},{s:-1,p:61}],
|
||||
},
|
||||
|
||||
6: {
|
||||
name: 'rook',
|
||||
aspect: 'fr-rook',
|
||||
graph: this.cbRookGraph(geometry),
|
||||
value: 5,
|
||||
abbrev: 'R',
|
||||
initial: [{s:1,p:0},{s:1,p:7},{s:-1,p:56},{s:-1,p:63}],
|
||||
castle: true,
|
||||
},
|
||||
|
||||
7: {
|
||||
name: 'queen',
|
||||
aspect: 'fr-queen',
|
||||
graph: this.cbQueenGraph(geometry),
|
||||
value: 8,
|
||||
abbrev: 'A',
|
||||
initial: [{s:1,p:3},{s:-1,p:59}],
|
||||
},
|
||||
|
||||
8: {
|
||||
name: 'king',
|
||||
aspect: 'fr-unicorn',
|
||||
isKing: true,
|
||||
graph: this.cbKnightGraph(geometry),
|
||||
abbrev: 'K',
|
||||
initial: [{s:1,p:4},{s:-1,p:60}],
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
promote: function(aGame,piece,move) {
|
||||
if(piece.t==1)
|
||||
return [0];
|
||||
else if(piece.t==3)
|
||||
return [2];
|
||||
else if(piece.t==0 && geometry.R(move.t)==7)
|
||||
return [4,5,6,7];
|
||||
else if(piece.t==2 && geometry.R(move.t)==0)
|
||||
return [9,10,11,12];
|
||||
return [];
|
||||
},
|
||||
|
||||
castle: {
|
||||
"4/0": {k:[3,2],r:[1,2,3],n:"O-O-O"},
|
||||
"4/7": {k:[5,6],r:[6,5],n:"O-O"},
|
||||
"60/56": {k:[59,58],r:[57,58,59],n:"O-O-O"},
|
||||
"60/63": {k:[61,62],r:[62,61],n:"O-O"},
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
View.Game.cbDefineView = function() {
|
||||
|
||||
var orthoBoardDelta = {
|
||||
// notationMode: 'in',
|
||||
// notationDebug: true,
|
||||
};
|
||||
var orthoBoard3d = $.extend(true,{},this.cbGridBoardClassic3DMargin,orthoBoardDelta);
|
||||
var orthoBoard2d = $.extend(true,{},this.cbGridBoardClassic2DNoMargin,orthoBoardDelta);
|
||||
|
||||
return {
|
||||
coords: {
|
||||
"2d": this.cbGridBoard.coordsFn.call(this,orthoBoard2d),
|
||||
"3d": this.cbGridBoard.coordsFn.call(this,orthoBoard3d),
|
||||
},
|
||||
boardLayout: [
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
],
|
||||
|
||||
board: {
|
||||
"2d": {
|
||||
draw: this.cbDrawBoardFn(orthoBoard2d),
|
||||
},
|
||||
"3d": {
|
||||
display: this.cbDisplayBoardFn(orthoBoard3d),
|
||||
},
|
||||
},
|
||||
clicker: {
|
||||
"2d": {
|
||||
width: 1500,
|
||||
height: 1500,
|
||||
},
|
||||
"3d": {
|
||||
scale: [.75,.75,.75],
|
||||
},
|
||||
},
|
||||
pieces: this.cbFairyPieceStyle({
|
||||
"default": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.5],
|
||||
},
|
||||
"2d": {
|
||||
width: 1300,
|
||||
height: 1300,
|
||||
},
|
||||
},
|
||||
"fr-amazon": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.6],
|
||||
},
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
/* Make the knight and amazon jump when leaping */
|
||||
View.Board.cbMoveMidZ = function(aGame,aMove,zFrom,zTo) {
|
||||
var geometry = aGame.cbVar.geometry;
|
||||
var x0 = geometry.C(aMove.f);
|
||||
var x1 = geometry.C(aMove.t);
|
||||
var y0 = geometry.R(aMove.f);
|
||||
var y1 = geometry.R(aMove.t);
|
||||
if(x1-x0==0 || y1-y0==0 || Math.abs(x1-x0)==Math.abs(y1-y0))
|
||||
return (zFrom+zTo)/2;
|
||||
else
|
||||
return Math.max(zFrom,zTo)+1500;
|
||||
}
|
||||
|
||||
|
||||
})();
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
var geometry = Model.Game.cbBoardGeometryGrid(8,8);
|
||||
|
||||
Model.Game.cbDefine = function() {
|
||||
|
||||
return {
|
||||
|
||||
geometry: geometry,
|
||||
|
||||
pieceTypes: {
|
||||
|
||||
0: {
|
||||
name: 'pawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
1: {
|
||||
name: 'ipawn-w',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:1,p:8},{s:1,p:9},{s:1,p:10},{s:1,p:11},{s:1,p:12},{s:1,p:13},{s:1,p:14},{s:1,p:15}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
2: {
|
||||
name: 'pawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
epCatch: false,
|
||||
},
|
||||
|
||||
3: {
|
||||
name: 'ipawn-b',
|
||||
aspect: 'fr-pawn',
|
||||
graph: this.cbInitialPawnGraph(geometry,-1),
|
||||
value: 1,
|
||||
abbrev: '',
|
||||
fenAbbrev: 'P',
|
||||
initial: [{s:-1,p:48},{s:-1,p:49},{s:-1,p:50},{s:-1,p:51},{s:-1,p:52},{s:-1,p:53},{s:-1,p:54},{s:-1,p:55}],
|
||||
epTarget: false,
|
||||
},
|
||||
|
||||
4: {
|
||||
name: 'knight',
|
||||
aspect: 'fr-knight',
|
||||
graph: this.cbKnightGraph(geometry),
|
||||
value: 2.9,
|
||||
abbrev: 'N',
|
||||
initial: [{s:1,p:6},{s:-1,p:62}],
|
||||
},
|
||||
|
||||
5: {
|
||||
name: 'bishop',
|
||||
aspect: 'fr-bishop',
|
||||
graph: this.cbBishopGraph(geometry),
|
||||
value: 3.1,
|
||||
abbrev: 'B',
|
||||
initial: [{s:1,p:2},{s:1,p:5},{s:-1,p:58},{s:-1,p:61}],
|
||||
},
|
||||
|
||||
6: {
|
||||
name: 'rook',
|
||||
aspect: 'fr-rook',
|
||||
graph: this.cbRookGraph(geometry),
|
||||
value: 5,
|
||||
abbrev: 'R',
|
||||
initial: [{s:1,p:0},{s:1,p:7},{s:-1,p:56},{s:-1,p:63}],
|
||||
castle: true,
|
||||
},
|
||||
|
||||
7: {
|
||||
name: 'queen',
|
||||
aspect: 'fr-queen',
|
||||
graph: this.cbQueenGraph(geometry),
|
||||
value: 8,
|
||||
abbrev: 'A',
|
||||
initial: [{s:1,p:3},{s:-1,p:59}],
|
||||
},
|
||||
|
||||
8: {
|
||||
name: 'king',
|
||||
aspect: 'fr-king',
|
||||
isKing: true,
|
||||
graph: this.cbKingGraph(geometry),
|
||||
abbrev: 'K',
|
||||
initial: [{s:1,p:4},{s:-1,p:60}],
|
||||
},
|
||||
|
||||
9: {
|
||||
name: 'lion',
|
||||
aspect: 'fr-lion',
|
||||
graph: this.cbShortRangeGraph(geometry,[
|
||||
[-1,-1],[-1,1],[1,-1],[1,1],[1,0],[0,1],[-1,0],[0,-1],
|
||||
[-2,0],[-2,-1],[-2,-2],[-1,-2],[0,-2],
|
||||
[1,-2],[2,-2],[2,-1],[2,0],[2,1],
|
||||
[2,2],[1,2],[0,2],[-1,2],[-2,2],[-2,1]]),
|
||||
value: 7.5,
|
||||
abbrev: 'L',
|
||||
initial: [{s:1,p:1},{s:-1,p:57}],
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
promote: function(aGame,piece,move) {
|
||||
if(piece.t==1)
|
||||
return [0];
|
||||
else if(piece.t==3)
|
||||
return [2];
|
||||
else if(piece.t==0 && geometry.R(move.t)==7)
|
||||
return [4,5,6,7];
|
||||
else if(piece.t==2 && geometry.R(move.t)==0)
|
||||
return [9,10,11,12];
|
||||
return [];
|
||||
},
|
||||
|
||||
castle: {
|
||||
"4/0": {k:[3,2],r:[1,2,3],n:"O-O-O"},
|
||||
"4/7": {k:[5,6],r:[6,5],n:"O-O"},
|
||||
"60/56": {k:[59,58],r:[57,58,59],n:"O-O-O"},
|
||||
"60/63": {k:[61,62],r:[62,61],n:"O-O"},
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
After Width: | Height: | Size: 13 KiB |
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* 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.
|
||||
*
|
||||
* Original authors: Jocly team
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
View.Game.cbDefineView = function() {
|
||||
|
||||
var orthoBoardDelta = {
|
||||
// notationMode: 'in',
|
||||
// notationDebug: true,
|
||||
};
|
||||
var orthoBoard3d = $.extend(true,{},this.cbGridBoardClassic3DMargin,orthoBoardDelta);
|
||||
var orthoBoard2d = $.extend(true,{},this.cbGridBoardClassic2DNoMargin,orthoBoardDelta);
|
||||
|
||||
return {
|
||||
coords: {
|
||||
"2d": this.cbGridBoard.coordsFn.call(this,orthoBoard2d),
|
||||
"3d": this.cbGridBoard.coordsFn.call(this,orthoBoard3d),
|
||||
},
|
||||
boardLayout: [
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
".#.#.#.#",
|
||||
"#.#.#.#.",
|
||||
],
|
||||
|
||||
board: {
|
||||
"2d": {
|
||||
draw: this.cbDrawBoardFn(orthoBoard2d),
|
||||
},
|
||||
"3d": {
|
||||
display: this.cbDisplayBoardFn(orthoBoard3d),
|
||||
},
|
||||
},
|
||||
clicker: {
|
||||
"2d": {
|
||||
width: 1500,
|
||||
height: 1500,
|
||||
},
|
||||
"3d": {
|
||||
scale: [.75,.75,.75],
|
||||
},
|
||||
},
|
||||
pieces: this.cbFairyPieceStyle({
|
||||
"default": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.5],
|
||||
},
|
||||
"2d": {
|
||||
width: 1300,
|
||||
height: 1300,
|
||||
},
|
||||
},
|
||||
"fr-amazon": {
|
||||
"3d": {
|
||||
scale: [.5,.5,.6],
|
||||
},
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
/* Make the knight and amazon jump when leaping */
|
||||
View.Board.cbMoveMidZ = function(aGame,aMove,zFrom,zTo) {
|
||||
var geometry = aGame.cbVar.geometry;
|
||||
var x0 = geometry.C(aMove.f);
|
||||
var x1 = geometry.C(aMove.t);
|
||||
var y0 = geometry.R(aMove.f);
|
||||
var y1 = geometry.R(aMove.t);
|
||||
if(x1-x0==0 || y1-y0==0 || Math.abs(x1-x0)==Math.abs(y1-y0))
|
||||
return (zFrom+zTo)/2;
|
||||
else
|
||||
return Math.max(zFrom,zTo)+1500;
|
||||
}
|
||||
|
||||
|
||||
})();
|
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 93 KiB |