Skip to content

Commit

Permalink
fix: failed to insert element-limited quartz into correct position
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvISsReimu authored Oct 31, 2024
1 parent 9fb5626 commit 9752ab4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/orbmentAssistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ export const runSimulatedAnnealing = (

const _convertQuartzLineToResultLine = (quartzLine: QuartzLine): ResultLine => {
const slots = [...quartzLine.regularSlotQuartzIds]
// insert quartz that is in elment-limited slot into slots in ResultLine
// insert quartz that is in element-limited slot into slots in ResultLine
quartzLine.elementLimitedSlots
.filter(elementLimitedSlot => elementLimitedSlot.hasQuartz())
.forEach((elementLimitedSlot, i) => {
slots.splice(i, 0, elementLimitedSlot.quartzId)
.forEach(elementLimitedSlot => {
slots.splice(elementLimitedSlot.position, 0, elementLimitedSlot.quartzId)
})

const elements: Record<ElementType, number> = {} as Record<
Expand Down

0 comments on commit 9752ab4

Please sign in to comment.