Skip to content

Commit d325315

Browse files
committed
Merge branch 'develop' of https://github.com/AbstractPlay/gameslib into develop
2 parents 80c1468 + cfe492c commit d325315

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/games/camelot.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,10 @@ export class CamelotGame extends GameBase {
405405
if (charge) {
406406
const jumps = this.getAllJumps(from, [], [excluded[0]], player);
407407
if (jumps.length > 0) {
408-
const charges: string[][] = [];
409408
for (const jump of jumps) {
410-
charges.push([...canterSequence, ...jump]);
409+
tos.push([...canterSequence, ...jump]);
410+
idx.push(canterSequence.length);
411411
}
412-
return [charges, Array(charges.length).fill(canterSequence.length) as number[]];
413412
} else {
414413
tos.push(canterSequence);
415414
idx.push(0);
@@ -420,10 +419,6 @@ export class CamelotGame extends GameBase {
420419
}
421420
}
422421
const canters = this.getCanters(from, excluded, player);
423-
if (canters.length === 0) {
424-
if (canterSequence.length === 0) { return [[], []]; }
425-
return [tos, [0]];
426-
}
427422
for (const cell of canters) {
428423
const [tos2, idx2] = this.getAllCanters(cell, [...canterSequence, cell], [...excluded, cell], player, charge);
429424
tos.push(...tos2);

0 commit comments

Comments
 (0)