Showing 28 of 568 total issues
Function render
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(world: GridWorld): Sprite {
const frame: Sprite = new Sprite();
if (!this.camera) {
return frame;
}
Function parse
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const parse = (input: string): HexagonalDirection[][] => {
const instructions: HexagonalDirection[][] = [];
for (const line of split(input)) {
const neighbours: HexagonalDirection[] = [];
let chomp = line;
Avoid deeply nested control flow statements. Open
Open
if (mirroredTo) {
beam.direction = mirroredTo;
beam.position = beam.position.add(mirroredTo);
} else if (splitter) {
const [dirA, dirB] = splitter;
Avoid too many return
statements within this function. Open
Open
return 0;
Avoid too many return
statements within this function. Open
Open
return 1;
Avoid too many return
statements within this function. Open
Open
return undefined;
Avoid too many return
statements within this function. Open
Open
return this.haltCondition(this.world);
Avoid too many return
statements within this function. Open
Open
return result;