@code-dot-org/dance-party
Advanced tools
Comparing version 0.0.26 to 0.0.27
{ | ||
"name": "@code-dot-org/dance-party", | ||
"version": "0.0.26", | ||
"version": "0.0.27", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
@@ -110,8 +110,15 @@ /* eslint-disable no-unused-vars, curly, eqeqeq, babel/semi, semi, no-undef */ | ||
// rest moves are at the beginning and shortBurst moves are all at the end | ||
this.world.MOVE_NAMES = this.world.MOVE_NAMES.sort((move1, move2) => ( | ||
!!move1.rest * -2 + !!move2.rest * 2 + !!move2.shortBurst * -1 + !!move1.shortBurst * 1 | ||
)); | ||
this.world.restMoveCount = this.world.MOVE_NAMES.filter(move => move.rest).length; | ||
this.world.fullLengthMoveCount = this.world.MOVE_NAMES.filter(move => !move.shortBurst).length; | ||
// We can't use Array.sort() : see https://stackoverflow.com/q/3026281 | ||
const restMoves = this.world.MOVE_NAMES.filter(move => move.rest); | ||
const nonRestingFullLengthMoves = this.world.MOVE_NAMES.filter(move => !move.rest && !move.shortBurst); | ||
const shortBurstMoves = this.world.MOVE_NAMES.filter(move => move.shortBurst); | ||
this.world.MOVE_NAMES = [ | ||
...restMoves, | ||
...nonRestingFullLengthMoves, | ||
...shortBurstMoves, | ||
]; | ||
this.world.restMoveCount = restMoves.length; | ||
this.world.fullLengthMoveCount = restMoves.length + nonRestingFullLengthMoves.length; | ||
this.songStartTime_ = 0; | ||
@@ -118,0 +125,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108282
3721705
45