From 3ebff0057e4a8d3f611c0e59f22ce870bd038661 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:17:30 +0100 Subject: remove all other states from eligible list when we reached our limit --- rules.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rules.js b/rules.js index 0cf1150..f22c790 100644 --- a/rules.js +++ b/rules.js @@ -2535,6 +2535,11 @@ function after_vm_remove_cube(us_state) { map_incr(game.vm.removed, us_state, 1) if (game.vm.all) { + if (map_key_count(game.vm.removed) === game.vm.limit) { + // remove all other states from eligible list when we reached our limit + set_filter(game.vm.us_states, s => map_has(game.vm.removed, s)) + } + if (!color_cubes(game.vm.cubes, us_state)) { set_delete(game.vm.us_states, us_state) -- cgit v1.2.3