Skip to content

Commit

Permalink
fix(core): filter child daemons from sequence breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
marcincichocki committed Oct 19, 2022
1 parent 20d1287 commit 0e47dde
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/core/bp-registry/test-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,20 @@
"55", "BD", "1C", "1C", "55"
],
"bufferSize": 7
},
{
"daemons": [
["BD", "1C", "BD"],
["BD", "BD", "BD"],
["BD", "BD"]
],
"grid": [
"BD", "BD", "E9", "1C", "E9",
"1C", "E9", "BD", "1C", "55",
"55", "55", "BD", "1C", "BD",
"1C", "BD", "1C", "1C", "BD",
"1C", "55", "55", "1C", "55"
],
"bufferSize": 7
}
]
1 change: 1 addition & 0 deletions src/core/solver/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class Sequence
// beginning and the end.
private getSequenceBreaks() {
return this.parts
.filter((d) => !d.isChild)
.map((d) => {
const start = this.tValue.indexOf(d.tValue);
const end = start + d.length - 1;
Expand Down

0 comments on commit 0e47dde

Please sign in to comment.