Skip to content

Commit 267f980

Browse files
committed
Hectochess : fix castling
1 parent a43e1fb commit 267f980

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/games/chessbase/decimal/hectochess-model.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232

3333
pieceTypes: p.pieceTypes,
3434

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

4242
promote: function(aGame,piece,move) {

src/games/chessbase/grid-board-view.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
paintCells: function(spec,ctx,images,channel) {
204204
var cSize = this.cbCSize(spec);
205205
var getCoords=spec.coordsFn(spec);
206-
for(var row=0;row<NBROWS;row++) {
206+
for(var row=0;row<(NBROWS);row++) {
207207
for(var col=0;col<NBCOLS;col++) {
208208
var pos = this.mViewAs==1 ?
209209
col+row*NBCOLS :
@@ -214,7 +214,7 @@
214214
var yCenter=coords.y;
215215
var cx=cSize.cx;
216216
var cy=cSize.cy;
217-
217+
218218
spec.paintCell.call(this,spec,ctx,images,channel,cellType,xCenter,yCenter,cx,cy);
219219
}
220220
}

0 commit comments

Comments
 (0)