From 9a99385abe6d9cd1885c84f1c6b5948af277cc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Neto?= <886455+jpneto@users.noreply.github.com> Date: Sat, 20 Jun 2026 08:14:15 +0100 Subject: [PATCH] Update pollux.ts --- src/games/pollux.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/games/pollux.ts b/src/games/pollux.ts index afd5cf52..235291f6 100644 --- a/src/games/pollux.ts +++ b/src/games/pollux.ts @@ -204,6 +204,7 @@ export class PolluxGame extends GameBase { const empties = (this.graph.listCells() as string[]).filter(c => !this.board.has(c)); ///// hack: to work with AP's playground (since flags no-moves and automove are incompatible) + // this is the computational heaviest ply of the game if (! safe ) { const ply2moves: string[] = []; this.shuffle(empties); @@ -268,6 +269,11 @@ export class PolluxGame extends GameBase { } } } + + if (! safe ) { // shows a sample of moves (just for the frontend, the code will keep `safe` as true) + this.shuffle(moves); + return moves.slice(0, 50); // output a random (smallish) selection of moves + } return moves; }