nunof07/phaser-breakout

View on GitHub
src/systems/bricks/lowestY.ts

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 1 of 1 total issue

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export function lowestY(bricks: ReadonlyArray<Brick>, defaultValue: number): number {
return bricks.length === 0
? defaultValue
: bricks.reduce((prev: Brick, curr: Brick) => prev.sprite().y > curr.sprite().y ? prev : curr)
.sprite().y;
Severity: Major
Found in src/systems/bricks/lowestY.ts and 1 other location - About 4 hrs to fix
src/systems/bricks/highestY.ts on lines 8..13
Category
Status