robotcoral/coral-app

View on GitHub
src/app/common/karol.interpreter.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 5 total issues

`` has 25 functions (exceeds 20 allowed). Consider refactoring.
Wontfix

private methods: KarolMethods = {
schritt: (param) => {
this.move(param);
},
linksdrehen: () => {
Severity: Minor
Found in src/app/common/karol.interpreter.ts - About 2 hrs to fix

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

    raiseSpeed() {
    if (this.settings.settings.globalSettings.executionSpeed < 5)
    this.settings.setSpeed(
    this.settings.settings.globalSettings.executionSpeed + 1
    );
    Severity: Major
    Found in src/app/common/karol.interpreter.ts and 1 other location - About 1 hr to fix
    src/app/common/karol.interpreter.ts on lines 155..160

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

    lowerSpeed() {
    if (this.settings.settings.globalSettings.executionSpeed > 1)
    this.settings.setSpeed(
    this.settings.settings.globalSettings.executionSpeed - 1
    );
    Severity: Major
    Found in src/app/common/karol.interpreter.ts and 1 other location - About 1 hr to fix
    src/app/common/karol.interpreter.ts on lines 148..153

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

    pause() {
    this.paused = true;
    this.running.next(false);
    clearTimeout(this.timeout);
    }
    Severity: Minor
    Found in src/app/common/karol.interpreter.ts and 1 other location - About 30 mins to fix
    src/app/common/karol.interpreter.ts on lines 138..142

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

    stop() {
    this.paused = false;
    this.running.next(false);
    clearTimeout(this.timeout);
    }
    Severity: Minor
    Found in src/app/common/karol.interpreter.ts and 1 other location - About 30 mins to fix
    src/app/common/karol.interpreter.ts on lines 132..136
    Category
    Status