Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frzyc committed Jan 30, 2025
1 parent 6e6ab6c commit bff58e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/zzz/solver/src/calc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function passSetFilter(
const k = key as DiscSetKey
const val = setCount[k]!
if (val === 1) return false // Rainbow
if (val >= 2 && val < 4 && !filter4.includes(k)) return false
if (val >= 2 && val < 4 && !filter2.includes(k)) return false
}
}
return true
Expand Down
6 changes: 3 additions & 3 deletions libs/zzz/solver/src/childWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let discStatsBySlot: Record<DiscSlotKey, DiscStats[]>
let constraints: Constraints
let baseStats: Stats
let formulaKey: FormulaKey
let SetFilter2p: DiscSetKey[]
let setFilter2p: DiscSetKey[]
let setFilter4p: DiscSetKey[]

export interface ChildCommandInit {
Expand Down Expand Up @@ -91,7 +91,7 @@ async function init({
discStatsBySlot = discs
constraints = initCons
formulaKey = fk
SetFilter2p = setFilter2
setFilter2p = setFilter2
setFilter4p = setFilter4

// Let parent know we are ready to optimize
Expand Down Expand Up @@ -158,7 +158,7 @@ async function start() {

const discs = [d1, d2, d3, d4, d5, d6]
// 1. Filter using set filter
if (!passSetFilter(discs, SetFilter2p, setFilter4p)) {
if (!passSetFilter(discs, setFilter2p, setFilter4p)) {
// Skip early due to failing set filter
skipped++
continue
Expand Down

0 comments on commit bff58e0

Please sign in to comment.