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.
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),
[Circular chess](https://mi-g.github.com/jocly/examples/browser/simple.html?circular-chess),
[Multi layers chess](https://mi-g.github.com/jocly/examples/browser/simple.html?raumschach),
[Hexagonal chess](https://mi-g.github.com/jocly/examples/browser/simple.html?glinski-chess),
[Chinese chess](https://mi-g.github.com/jocly/examples/browser/simple.html?xiangqi),
[Middle-age chess](https://mi-g.github.com/jocly/examples/browser/simple.html?courier-chess),
[Scrum](https://mi-g.github.com/jocly/examples/browser/simple.html?scrum)
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?game=circular-chess),
[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?game=glinski-chess),
[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?game=courier-chess),
[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)
@ -62,7 +62,7 @@ Building
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
- 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
API Documentation

View File

@ -144,9 +144,9 @@
return [0];
else if(piece.t==3)
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];
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 [];
},

View File

@ -110,7 +110,7 @@
castle: {
"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) {

View File

@ -148,9 +148,9 @@
return [0];
else if(piece.t==3)
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];
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 [];
},

View File

@ -35,7 +35,7 @@
}
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 },
}

View File

@ -217,4 +217,3 @@
}
})();

View File

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

View File

@ -30,7 +30,7 @@
],posNames);
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 },
}