Skip to content

Commit

Permalink
Hectochess : fix castling
Browse files Browse the repository at this point in the history
  • Loading branch information
fhoudebert committed May 5, 2024
1 parent a43e1fb commit b8e3172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/games/chessbase/decimal/hectochess-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

pieceTypes: p.pieceTypes,

castle: {
"15/10": {k:[14],r:[15],n:"O-O-O",extra:-2},
"15/19": {k:[16],r:[15],n:"O-O",extra:-2},
"85/80": {k:[84],r:[85],n:"O-O-O",extra:-2},
"85/89": {k:[86],r:[85],n:"O-O",extra:-2},
castle:{
"15/10": {k:[14],r:[11,12,13,14,15],n:"O-O-O",extra:-2},
"15/19": {k:[16],r:[18,17,16,15],n:"O-O",extra:-2},
"85/80": {k:[84],r:[81,82,83,84,85],n:"O-O-O",extra:-2},
"85/89": {k:[86],r:[88,87,86,85],n:"O-O",extra:-2},
},

promote: function(aGame,piece,move) {
Expand Down
4 changes: 2 additions & 2 deletions src/games/chessbase/grid-board-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
paintCells: function(spec,ctx,images,channel) {
var cSize = this.cbCSize(spec);
var getCoords=spec.coordsFn(spec);
for(var row=0;row<NBROWS;row++) {
for(var row=0;row<(NBROWS);row++) {
for(var col=0;col<NBCOLS;col++) {
var pos = this.mViewAs==1 ?
col+row*NBCOLS :
Expand All @@ -214,7 +214,7 @@
var yCenter=coords.y;
var cx=cSize.cx;
var cy=cSize.cy;

spec.paintCell.call(this,spec,ctx,images,channel,cellType,xCenter,yCenter,cx,cy);
}
}
Expand Down

0 comments on commit b8e3172

Please sign in to comment.