Maingron/MaingronZelda

View on GitHub

Showing 130 of 130 total issues

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

            if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] == "down") {
                if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][2] < +data.enemys[data.forenemys[data.temp.iOfEnemyTick]][6] - 1) {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][2]++;
                } else {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] = "cooldown12";
Severity: Major
Found in scripts.js and 3 other locations - About 5 hrs to fix
scripts.js on lines 896..914
scripts.js on lines 902..914
scripts.js on lines 908..914

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 149.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            } else if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] == "up") {
                if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][2] > +data.enemys[data.forenemys[data.temp.iOfEnemyTick]][4] + 1) {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][2]--;
                } else {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] = "cooldown12";
Severity: Major
Found in scripts.js and 3 other locations - About 5 hrs to fix
scripts.js on lines 890..914
scripts.js on lines 902..914
scripts.js on lines 908..914

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 149.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            } else if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] == "right") {
                if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][1] < +data.enemys[data.forenemys[data.temp.iOfEnemyTick]][5] - 1) {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][1]++;
                } else {
                    data.enemys[data.forenemys[data.temp.iOfEnemyTick]][9] = "cooldown12";
Severity: Major
Found in scripts.js and 3 other locations - About 5 hrs to fix
scripts.js on lines 890..914
scripts.js on lines 896..914
scripts.js on lines 908..914

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 149.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function doMove has 136 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function doMove() {

    if (data.runner.position.top <= 0) {
        data.runner.cango.up = !1;
    } else if (data.runner.position.top >= data.field.height - 1) {
Severity: Major
Found in scripts.js - About 5 hrs to fix

    Function doEnemyTick has 132 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function doEnemyTick() {
        data.temp.slicernr = 0;
    
        for (data.temp.iOfEnemyTick = 0; data.enemys.length > data.temp.iOfEnemyTick; data.temp.iOfEnemyTick++) {
            if (data.enemys[data.temp.iOfEnemyTick][0] == "spikes") {
    Severity: Major
    Found in scripts.js - About 5 hrs to fix

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

                      if (+data.enemys[data.temp.iOfInit2][6] < +data.enemys[data.temp.iOfInit2][4]) {
                          document.getElementsByClassName("slicer-marker2")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer-marker4")[data.temp.iOfInit2].style.animationName = "error1";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 218..221
      scripts.js on lines 222..225
      scripts.js on lines 227..230
      scripts.js on lines 237..241
      scripts.js on lines 243..247

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (+data.enemys[data.temp.iOfInit2][4] > +data.enemys[data.temp.iOfInit2][2]) {
      
                          document.getElementsByClassName("slicer-marker2")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer")[data.temp.iOfInit2].style.borderTop = "1px solid lime";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 218..221
      scripts.js on lines 222..225
      scripts.js on lines 227..230
      scripts.js on lines 233..236
      scripts.js on lines 243..247

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (+data.enemys[data.temp.iOfInit2][3] > +data.enemys[data.temp.iOfInit2][5]) {
                          document.getElementsByClassName("slicer-marker1")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer-marker3")[data.temp.iOfInit2].style.animationName = "error1";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 222..225
      scripts.js on lines 227..230
      scripts.js on lines 233..236
      scripts.js on lines 237..241
      scripts.js on lines 243..247

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (+data.enemys[data.temp.iOfInit2][3] > +data.enemys[data.temp.iOfInit2][1]) {
                          document.getElementsByClassName("slicer-marker1")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer")[data.temp.iOfInit2].style.borderLeft = "1px solid lime";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 218..221
      scripts.js on lines 227..230
      scripts.js on lines 233..236
      scripts.js on lines 237..241
      scripts.js on lines 243..247

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (+data.enemys[data.temp.iOfInit2][5] < +data.enemys[data.temp.iOfInit2][1]) {
                          document.getElementsByClassName("slicer-marker3")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer")[data.temp.iOfInit2].style.borderRight = "1px solid lime";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 218..221
      scripts.js on lines 222..225
      scripts.js on lines 233..236
      scripts.js on lines 237..241
      scripts.js on lines 243..247

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                      if (+data.enemys[data.temp.iOfInit2][6] < +data.enemys[data.temp.iOfInit2][2]) {
      
                          document.getElementsByClassName("slicer-marker4")[data.temp.iOfInit2].style.animationName = "error1";
                          document.getElementsByClassName("slicer")[data.temp.iOfInit2].style.borderBottom = "1px solid lime";
                      }
      Severity: Major
      Found in scripts.js and 5 other locations - About 4 hrs to fix
      scripts.js on lines 218..221
      scripts.js on lines 222..225
      scripts.js on lines 227..230
      scripts.js on lines 233..236
      scripts.js on lines 237..241

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 125.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function doTick has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function doTick() {
      
          if (!data.runner.inmenu) {
              data.runner.oldposition.top = data.runner.position.top;
              data.runner.oldposition.left = data.runner.position.left;
      Severity: Major
      Found in scripts.js - About 4 hrs to fix

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

            if (eventkeylowercase == "w") {
                data.keypress.up = !0;
            } else if (eventkeylowercase == "s") {
                data.keypress.down = !0;
            } else if (eventkeylowercase == "arrowup") {
        Severity: Major
        Found in scripts.js and 1 other location - About 4 hrs to fix
        scripts.js on lines 368..376

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 115.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

            if (eventkeylowercase == "a") {
                data.keypress.left = !0;
            } else if (eventkeylowercase == "d") {
                data.keypress.right = !0;
            } else if (eventkeylowercase == "arrowleft") {
        Severity: Major
        Found in scripts.js and 1 other location - About 4 hrs to fix
        scripts.js on lines 354..362

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 115.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function createRoom has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
        Open

        function createRoom(x,y, type, buildTop = 1, buildRight = 1, buildBottom = 1, buildLeft = 1) {
            // Build** == 0: Don't spawn walls on that side
            // Build** == 1: Spawn walls on that side + leave space for door
            // TODO Build** == 2: Spawn walls on that side and block walls
            // TODO Build** == 3: Spawn fully wall-filled room
        Severity: Minor
        Found in levels.js - About 3 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function init2 has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function init2() {
            for (data.iOfInit2 = 0; data.walls.length > data.iOfInit2; data.iOfInit2++) {
                data.temp.setWalls = [];
                data.temp.setWalls[data.iOfInit2] = data.walls[data.iOfInit2].split(",");
                summonElement("wall", objects.field, +data.temp.setWalls[data.iOfInit2][1], +data.temp.setWalls[data.iOfInit2][2]);
        Severity: Major
        Found in scripts.js - About 3 hrs to fix

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

                  if (data.runner.position.left == data.walls[data.temp.iOfTick][1] + 1 && data.runner.position.top == data.walls[data.temp.iOfTick][2]) {
                      data.runner.cango.left = 0;
                  }
          Severity: Major
          Found in scripts.js and 2 other locations - About 3 hrs to fix
          scripts.js on lines 474..476
          scripts.js on lines 478..480

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 106.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

                  if (data.runner.position.left == data.walls[data.temp.iOfTick][1] - 1 && data.runner.position.top == data.walls[data.temp.iOfTick][2]) {
                      data.runner.cango.right = 0;
                  }
          Severity: Major
          Found in scripts.js and 2 other locations - About 3 hrs to fix
          scripts.js on lines 474..476
          scripts.js on lines 482..484

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 106.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

                  if (data.runner.position.top == data.walls[data.temp.iOfTick][2] + 1 && data.runner.position.left == data.walls[data.temp.iOfTick][1]) {
                      data.runner.cango.up = 0;
                  }
          Severity: Major
          Found in scripts.js and 2 other locations - About 3 hrs to fix
          scripts.js on lines 478..480
          scripts.js on lines 482..484

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 106.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

                  if (data.runner.position.left != data.runner.oldposition.left) {
                      data.runner.oldotherposition.left = +data.runner.oldposition.left;
                      data.runner.oldotherposition.top = +data.runner.oldposition.top;
                  }
          Severity: Major
          Found in scripts.js and 1 other location - About 3 hrs to fix
          scripts.js on lines 577..580

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 101.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language