Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairy set #50

Open
wants to merge 183 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
c83a107
Let general handling of repeats track loop length
Feb 4, 2019
5a29ba0
Make Mersenne Twister available directly
Feb 9, 2019
453382b
Pass piece count to user evaluation in chessbase
Nov 12, 2018
0213b5e
Improve chessbase control over game result
Nov 11, 2018
a7dce67
Generalize e.p. capture in chessbase
Dec 16, 2023
0b4ab5c
Allow chess base model to track multiple royals
Nov 16, 2018
de65782
Fragile repair of 50-move rule in chess base
Feb 4, 2019
803031c
Subtle change in how chessbase performs castling
Dec 16, 2023
29f86a1
Fix hopper attacks in chessbase
Dec 6, 2023
7cf8f70
Support flying capture in the chessbase module
Dec 15, 2023
ee45046
Support brouhaha squares in chessbase
Dec 16, 2023
b071803
Add function to streamline move-graph generation
Jan 11, 2024
46b3ebe
Improve chessbase animation of lame oblique moves
Nov 11, 2018
54b72b5
Improve default cbMoveMidZ for grid board
Jan 7, 2024
95ab8af
Provide better infra-structure for custom chess moves
Nov 11, 2018
2d8684f
Add support for entry of two-leg moves
Nov 13, 2018
3103bf2
Fix entry and animation of non-standard castlings
Dec 16, 2023
0a4eb51
Fix repetition detection in chess base model
Feb 9, 2019
fd4613e
New sub-model: support common fairy and multi-leg chess moves
Dec 4, 2023
5ec6784
Support piece definitions from FEN in fairy-move-model.js
Dec 19, 2023
b1498ed
Let cbSkiGraph respect confinement
Jan 11, 2024
29f9fd9
delete wrongly named crowned-rook icon
Jan 12, 2024
49d2fc0
Scale Griffon
Jan 4, 2024
84c92b9
New fairy pieces: sized and deformed
Nov 15, 2018
845efed
Create visuals for entire fairy set
Jan 12, 2024
f7d9827
New variant: Team-Mate Chess
Nov 12, 2018
2c177ef
New variant: Werewolf Chess
Nov 13, 2018
b0f6f4a
New variant: Elven Chess
Nov 15, 2018
40dc4b9
New variant: Spartan Chess
Nov 16, 2018
3d70df4
New variant: Scirocco
Jan 16, 2019
9c80add
Fix castling and stalemate in Wildebeest Chess
Feb 9, 2019
adfaa2b
Fix Xiangi stalemate score
Jan 22, 2019
6e64cfa
Implement ban on perpetual checking in Xiangqi
Feb 4, 2019
cb13e39
New sub-model: support for drop moves in chess base
Feb 7, 2019
c568c73
New piece set: oriental Shogi tiles
Feb 7, 2019
460103d
New variant: Shogi
Feb 7, 2019
c420dd8
Add Tori Shogi kanji pieces
Nov 29, 2023
a892c21
New variant: Tori Shogi
Nov 29, 2023
bc2ca45
Move Shogi files to shogi directory
Nov 29, 2023
8a13c39
New variant: Mini-Shogi
Nov 29, 2023
a781035
Move 10x8 and Tressau variants to separate directory
Nov 29, 2023
fc19ee9
Move 3D variants to separate directory
Nov 29, 2023
cfde962
Move hexagonal variants to separate directory
Nov 29, 2023
767689a
Move all 5x6 and smaller variants to separate directory
Nov 29, 2023
2b289e4
Move circular variants to separate directory
Nov 29, 2023
a811f39
Move variants from Jean-Louis Cazaux to separate directory
Nov 29, 2023
d00b62e
Move regional/historic variants to separate directory
Nov 30, 2023
9421e81
Move 10x10 variants to separate directory
Nov 30, 2023
50d4271
Move variants with Amazons to a separate directory
Nov 30, 2023
ee1f023
Move variants with knighted pieces to seperate directory
Nov 30, 2023
ce387dd
Move variants with standard pieces to separate directory
Nov 30, 2023
6176ca1
Give fr-cannon2 its own fairy sprite
Dec 21, 2023
3ca5bf9
New fairy pieces: Stork and Phoenix
Dec 19, 2023
5f1eed3
New fairy pieces: Champion and Wizard
Dec 28, 2023
c65760d
New fairy pieces: Gold, Silver and Copper General
Dec 28, 2023
0bc1ba5
New fairy piece: Cobra
Dec 29, 2023
612ed35
New fairy piece: Flamingo
Dec 29, 2023
2c39de1
Change 3d image of fr-saint
Jan 2, 2024
1061ef0
New fairy pieces: flying sliders
Jan 2, 2024
6e899c9
New fairy piece: Flying Saint
Jan 4, 2024
195b195
New fairy piece: Samurai
Jan 4, 2024
7aca25f
New fairy piece: Terror
Jan 4, 2024
65ad1cc
Improve fairy piece: Rhino
Dec 29, 2023
9a859cf
Improve 2d image of Commoner
Jan 4, 2024
fa28083
New variant: Makromachy
Dec 19, 2023
63fd655
New variant: Minjiku Shogi
Jan 12, 2024
91a1c13
Add command-line tool for aiding in 3d piece creation
Jan 4, 2024
33d5213
New fairy piece: Berolina Pawn
Dec 29, 2023
e06f0f5
New fairy piece: Owl
Jan 4, 2024
91f5893
New fairy piece: Scout
Jan 4, 2024
29b6d87
New fairy piece: Caliph
Jan 4, 2024
f1a4fa0
New fairy piece: Lance
Jan 4, 2024
e99cea5
New fairy piece: Sword
Jan 4, 2024
e4c4798
Shape up fairy sprites
Jan 5, 2024
47a90a7
use of fairy-move model for bigorra, fantastic XIII and gigachess II …
fhoudebert Dec 22, 2023
52d322f
Timurid : Simplification of doc/rules and credits
fhoudebert Dec 22, 2023
927317e
move doc from cazaux to res/rules
fhoudebert Dec 22, 2023
a734b6c
add new Fairy piece : terror, a dragon used in makromachy
fhoudebert Dec 23, 2023
b7f0619
improve doc of fantastic XIII
fhoudebert Dec 24, 2023
264b1b0
move html files for documentation, rules, credits in res/rules
fhoudebert Dec 26, 2023
709c53d
create duodecimal group for 12*12 chess variants
fhoudebert Dec 26, 2023
adc6bd5
replacement of the eagle by the griffon
fhoudebert Dec 26, 2023
c760dc9
add grant acedrex and create an historical group
fhoudebert Dec 27, 2023
c1e0e70
use griffons in visuals for timurid variants
fhoudebert Dec 27, 2023
fcbf132
updated jocly urls from mi-g to aclap-dev
mi-g Dec 26, 2023
bc273a7
ignore private dir
mi-g Dec 29, 2023
8885176
use fr-cobra for snake and aquila 2d for hawk
fhoudebert Jan 3, 2024
7d671ef
improve graphs images for rules : hawk + zebra
fhoudebert Jan 4, 2024
efcdc3f
build grand chess from a FEN string
Dec 29, 2023
964a6b4
documente l’utilisation du fairy move model pour une variante 10x8 : …
fhoudebert Jan 4, 2024
bcda5c3
use fairy model in zanzibar
Jan 10, 2024
128dc00
replace fr-rhino by fr-rhino2 in cazaux variants
Jan 11, 2024
6f60898
update visuals for wild mirza with cobra/griffon
fhoudebert Jan 5, 2024
4e4b125
improve doc for wild mirza and timurid
fhoudebert Jan 5, 2024
25ecbb2
rename griffin->griffon, squirle->squirrel, huscarl->axe, move html t…
fhoudebert Jan 13, 2024
9ff409b
hawk : use falcon instead of aquila 2d sprite
fhoudebert Jan 13, 2024
510beeb
Update makromachy-rules.html
fhoudebert Jan 14, 2024
4c31372
Use Fairy Set visual for documentation (rules)
fhoudebert Jan 14, 2024
d8c16bf
Add visuals for werewolf
fhoudebert Jan 14, 2024
59115ab
Add 3d kanji pieces for Chu Shogi
Dec 5, 2023
2a9f0c1
New variant: Chu Shogi
Dec 5, 2023
6712f04
New piece: Goat
Jan 15, 2024
da239c5
New piece: Ram
Jan 15, 2024
006be32
Scirocco: let it use some of the new pieces
Jan 15, 2024
f83df2e
Chessbase: fix lastMove handling
Jan 16, 2024
635b94c
Chessbase: split up cbInitialPosition
Jan 17, 2024
ffcbae3
Chessbase: fix entry of extra castlings
Jan 18, 2024
1788915
Fairy-move-model: support partial graph merging
Jan 18, 2024
c877879
New chess sub-model: prelude
Jan 17, 2024
2e1ac0c
Prelude: support persistent selections
Jan 18, 2024
f3ec88e
Capablanca Chess: turn into prelude reference implementation
Jan 18, 2024
3e59965
Chessbase: support flexible castling
Jan 19, 2024
10e8513
Capablanca Chess: adapt to the new castling support
Jan 19, 2024
5513dfd
Use of a prelude to group together all timurid variants
fhoudebert Jan 19, 2024
d426a0a
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Jan 19, 2024
54c1059
Wildebeest Chess: refactor using new castling support
Jan 19, 2024
ee278c3
Chessbase: fix notation of flexible castling
Jan 19, 2024
46921b6
Specific configuration in index.js for Capablanca
fhoudebert Jan 19, 2024
7817712
Wildebeest Chess: fix view
Jan 19, 2024
a1c648d
Capablanca Chess: let all castlings jump
Jan 19, 2024
a4b15e3
Scirocco: New visuals
Jan 19, 2024
bf7510d
Scirocco: rely on default cbMoveMidZ
Jan 19, 2024
60db1bc
Minjiku Shogi: clarify rule decscription
Jan 19, 2024
43ed389
Prelude submodel: scrap key update
Jan 20, 2024
5482920
Grid board: double hop height of cbMoveMidZ
Jan 20, 2024
d656c74
Capablanca Chess: rely on default cbMoveMidZ
Jan 20, 2024
7e5c16f
Scirocco: fix captures induced by Dervish
Jan 21, 2024
d8a4bbd
Scirocco: update rules
Jan 21, 2024
3393a90
Capablanca: fix last patch
Jan 21, 2024
33bbf18
Chu shogi : set path to visuals in index.js
fhoudebert Jan 21, 2024
c28fb95
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Jan 22, 2024
6150673
merge hgm + remove prelude in zanzibar
fhoudebert Jan 22, 2024
b9f9e96
Minjiku Shogi: fix burning on area move
Jan 22, 2024
ae1945c
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Jan 22, 2024
357beb2
Timurid chess : update with a link towards the chessvariant page
fhoudebert Jan 23, 2024
7f2fc6c
Timurid : add samarcande variant with sultan
fhoudebert Jan 29, 2024
83210b8
add fr rules for zanzibar, bigorra and gigachess II
fhoudebert Feb 1, 2024
5098569
Fix pawns-per-file limit in drop model
Feb 5, 2024
1960d2d
New variant : Hectochess
fhoudebert Feb 7, 2024
1280073
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Feb 10, 2024
3416ad2
Shogis : use of selected skin sprites for promotion panel
fhoudebert Feb 10, 2024
b58f18c
Chessbase: fix brouhaha squares
Feb 10, 2024
cb7334a
Chessbase: Split fairy-move sub-model
Feb 10, 2024
7720ac0
Chessbase: add function for defining castlings in fairy-piece-model
Feb 10, 2024
dfcf8da
Chessbase: Fix index for splitimg of fairy-move-model
Feb 10, 2024
31f7848
Fix fairy-piece-model
Feb 10, 2024
6530ed7
capablanca : fix parameter for janus king then queen
fhoudebert Feb 10, 2024
0598d0c
Chessbase/shogi: Make separate sprites file for tenjiku-set
Feb 13, 2024
b49e19a
Shogi: Finish tenjiku-set
Feb 14, 2024
6933c1e
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Feb 13, 2024
529f47d
Improve 2d sprites for chu shogi
fhoudebert Feb 15, 2024
ab29fc7
Fix view-as bug that occurs when the game has other data than view-as…
fhoudebert Feb 20, 2024
c069106
Acedrex : Fix move of the leon + add 3d tiger
fhoudebert Mar 3, 2024
c2561af
Shogi: add western 2d sprites
Mar 5, 2024
a242396
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Mar 6, 2024
493c22c
Tori Shogi: add western 2d sprites
Mar 6, 2024
66c62f9
Shogi : add skin 2D pictos + rules
fhoudebert Mar 6, 2024
f468d8d
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Mar 7, 2024
e80c498
Tori Shogi : add rules and use 2D pictograms
fhoudebert Mar 7, 2024
1161ec2
Timurid : unpromoted central piece with ships : phoenix, wizard, squi…
fhoudebert Mar 14, 2024
db5c361
Fairy set: replace Cobra sprite
Mar 19, 2024
474f4ea
New fairy piece: Spider
Mar 19, 2024
1f24fab
Team-Mate Chess: change piece representation
Mar 19, 2024
55814de
Fix Cobra 2d image
Mar 20, 2024
f91c1d8
Minjiku Shogi: replace Ninja representation
Mar 20, 2024
aad820f
Chessbase: allow pieces to start off board
Mar 21, 2024
2dd2a3a
Fairy-piece model: fix SkiGraph
Mar 21, 2024
84817d1
Team-Mate Chess: Implement Brute promotion
Mar 21, 2024
14a13f7
Werewolf Chess: improve evaluation
Mar 21, 2024
17dd0bf
Elven Chess: fix evaluation
Mar 21, 2024
af8fe67
Spartan Chess: fix evaluation
Mar 21, 2024
0497d94
Scirocco: fix evaluation
Mar 21, 2024
5394b1d
Use Cobra from team-mate everywhere
fhoudebert Mar 21, 2024
edb3ef9
Team-Mate Chess: fix rules
Mar 21, 2024
f2a5d97
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Mar 22, 2024
e1e02b8
Scirocco: let evaluation score promotability
Mar 22, 2024
856c9cd
improve evaluations
fhoudebert Mar 22, 2024
9791595
Chessbase: pass pieceValue to dedicated evaluate
Mar 23, 2024
a43e1fb
Merge branch 'pullreq' of http://hgm.nubati.net/git/jocly into fairySet
fhoudebert Mar 27, 2024
b8e3172
Hectochess : fix castling
fhoudebert Apr 22, 2024
b387e49
Shogis : improve rules
fhoudebert May 15, 2024
51de0a5
Bigorra : fix the soldier's movement and initial position
fhoudebert May 20, 2024
7d67439
Bigorra : fix the soldier's movement and initial position
fhoudebert Jun 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/
update-gh-pages.sh
tmp/
npm-debug.log
private/
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ artificial intelligence to play against.
Demos
-----

[Controlled interface](https://mi-g.github.io/jocly/examples/browser/control.html) for playing Chess.
[Controlled interface](https://aclap-dev.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.io/jocly/examples/browser/simple.html?game=classic-chess),
[Circular chess](https://mi-g.github.io/jocly/examples/browser/simple.html?game=circular-chess),
[Multi layers chess](https://mi-g.github.io/jocly/examples/browser/simple.html?game=raumschach),
[Hexagonal chess](https://mi-g.github.io/jocly/examples/browser/simple.html?game=glinski-chess),
[Chinese chess](https://mi-g.github.io/jocly/examples/browser/simple.html?game=xiangqi),
[Middle-age chess](https://mi-g.github.io/jocly/examples/browser/simple.html?game=courier-chess),
[Scrum](https://mi-g.github.io/jocly/examples/browser/simple.html?game=scrum)
Simple human vs computer: [Classic chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=classic-chess),
[Circular chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=circular-chess),
[Multi layers chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=raumschach),
[Hexagonal chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=glinski-chess),
[Chinese chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=xiangqi),
[Middle-age chess](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=courier-chess),
[Scrum](https://aclap-dev.github.io/jocly/examples/browser/simple.html?game=scrum)

Or see and try [all available games](https://mi-g.github.io/jocly/examples/browser/multiple.html)
Or see and try [all available games](https://aclap-dev.github.io/jocly/examples/browser/multiple.html)

[JoclyBoard](https://github.com/mi-g/joclyboard) is a multi-platform desktop application based on Jocly
[JoclyBoard](https://github.com/aclap-dev/joclyboard) is a multi-platform desktop application based on Jocly
and [Electron](https://electron.atom.io/).

Install
Expand Down Expand Up @@ -53,7 +53,7 @@ Building
- install the *node.js* environment (using [nvm](https://github.com/creationix/nvm) is probably a good idea)
- install *gulp*: `npm install -g gulp`
- install [git](https://git-scm.com/downloads)
- clone Jocly from *github*: `git clone https://github.com/mi-g/jocly.git`
- clone Jocly from *github*: `git clone https://github.com/aclap-dev/jocly.git`
- enter the `jocly` directory
- download required modules: `npm install`
- build: `gulp build`
Expand All @@ -69,5 +69,5 @@ API Documentation
-----------------

Jocly offers two distinct APIs:
- the [Application API](https://github.com/mi-g/jocly/wiki/Application-API) to make Web applications
- the [Game API](https://github.com/mi-g/jocly/wiki/Game-API) to create games to run with Jocly features
- the [Application API](https://github.com/aclap-dev/jocly/wiki/Application-API) to make Web applications
- the [Game API](https://github.com/aclap-dev/jocly/wiki/Game-API) to create games to run with Jocly features
20 changes: 14 additions & 6 deletions examples/browser/js/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ $(document).ready(function () {
var gameName = m && m[1] || "classic-chess";
var elementId = "applet";
var area = document.getElementById(elementId);

Jocly.createMatch(gameName).then((match) => {
// get game configuration to setup control UI
match.getConfig()
Expand All @@ -138,16 +137,15 @@ $(document).ready(function () {
$("#game-status").show();

var viewOptions = config.view;

// fills Skins dropdown with available skins
viewOptions.skins.forEach(function(skin) {
$("<option/>").attr("value",skin.name).text(skin.title).appendTo($("#options-skin"));
});
$("#options").show();

// get saved view options if any
var viewOptions = window.localStorage && window.localStorage[gameName+".options"] &&
JSON.parse(window.localStorage[gameName+".options"]) || undefined;

// the match need to be attached to a DOM element for displaying the board
match.attachElement(area, { viewOptions: viewOptions })
.then( () => {
Expand Down Expand Up @@ -213,7 +211,6 @@ $(document).ready(function () {
});
var mode = window.localStorage && window.localStorage[gameName+".mode"] || "self-comp";
$("#mode").val(mode).trigger("change");

if(config.view.switchable) {
$("#view-as").show().on("change",()=>{
var playerMode = $("#view-as").val();
Expand All @@ -224,17 +221,28 @@ $(document).ready(function () {
player = Jocly.PLAYER_A;
else if(playerMode=="player-b")
player = Jocly.PLAYER_B;
if(player)
if(player){
match.setViewOptions({
viewAs: player
})
.then( () => {
RunMatch(match,progressBar);
});
}
});

var viewAs = window.localStorage && window.localStorage[gameName+".view-as"];
if(viewAs)

if(viewAs===undefined || Object.is(viewAs, null) /*|| viewAs==="null"*/)
viewAs="player-a";

if(viewAs){
$("#view-as").val(viewAs).trigger("change");
var playerMode = $("#view-as").val();
}else{
console.log("viewAs",viewAs );
console.log("window.localStorage",window.localStorage );
}
}

})
Expand Down
19 changes: 14 additions & 5 deletions src/core/jocly.game.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,18 +946,18 @@ JocGame.prototype.AddBest = function(aMove, aBoard) {
this.mBestMoves.push(move);
}

JocGame.prototype.GetRepeatOccurence = function(board) {
JocGame.prototype.GetRepeatOccurence = function(board, len) {
if(!this.mOptions.preventRepeat)
return -1;
var repOcc=this.mVisitedBoards[board.GetSignature()];
return repOcc;
return (len ? this.mPlayedMoves.length - (repOcc >>> 4) : repOcc&15);
}

JocGame.prototype.HandleRepeat = function(board) {
if(this.mOptions.preventRepeat) {
var sign=board.GetSignature(true);
if(this.mVisitedBoards[sign]===undefined)
this.mVisitedBoards[sign]=1;
this.mVisitedBoards[sign]=1 + 16*this.mPlayedMoves.length;
else
this.mVisitedBoards[sign]++;
}
Expand All @@ -966,9 +966,10 @@ JocGame.prototype.HandleRepeat = function(board) {
JocGame.prototype.UnhandleRepeat = function(board) {
if(this.mOptions.preventRepeat) {
var sign=board.GetSignature(true);
if(this.mVisitedBoards[sign]==1)
var n=this.mVisitedBoards[sign]&15;
if(n==1)
delete this.mVisitedBoards[sign];
else if(this.mVisitedBoards[sign]>1)
else if(n>1)
this.mVisitedBoards[sign]--;
}
}
Expand Down Expand Up @@ -1307,8 +1308,16 @@ JocBoard.prototype.CompactMoveString = function(aGame,aMove) {

/*-- Zobrist implementation --*/

JocGame.Twister = 0;

JocGame.LetsTwist=function(seed) {
if(!JocGame.Twister) JocGame.Twister=new MersenneTwister(seed);
return JocGame.Twister;
}

JocGame.Zobrist=function(params) {
var mt=new MersenneTwister(12345);

var paramNames=[];
for(var f in params)
paramNames.push(f);
Expand Down
Loading