Maingron/MaingronZelda

View on GitHub

Showing 89 of 130 total issues

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

    } else if (data.keypress.down && data.runner.cango.down) {

        data.runner.position.top++;

        setTimeout(function () {
Severity: Major
Found in scripts.js and 1 other location - About 5 days to fix
scripts.js on lines 626..709

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 854.

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.keypress.up && data.runner.cango.up) {

        data.runner.position.top--;

        setTimeout(function () {
Severity: Major
Found in scripts.js and 1 other location - About 5 days to fix
scripts.js on lines 662..709

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 854.

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

            } else if (data.runner.position.left == data.enemys[data.temp.iOfEnemyTick][1]) { //If above or below slicer


                if (data.runner.position.top > data.enemys[data.temp.iOfEnemyTick][2] && data.runner.position.top < data.enemys[data.temp.iOfEnemyTick][6]) {
                    data.temp.iOfSlicer = 0;
Severity: Major
Found in scripts.js and 1 other location - About 4 days to fix
scripts.js on lines 852..877

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 811.

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

            } else if (data.runner.position.top == data.enemys[data.temp.iOfEnemyTick][2]) { //If left or right from slicer

                if (data.runner.position.left > data.enemys[data.temp.iOfEnemyTick][1] && data.runner.position.left < data.enemys[data.temp.iOfEnemyTick][5]) {
                    data.temp.iOfSlicer = 0;

Severity: Major
Found in scripts.js and 1 other location - About 4 days to fix
scripts.js on lines 826..877

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 811.

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

    } else if (data.keypress.right && data.runner.cango.right) {

        data.runner.position.left++;

        setTimeout(function () {
Severity: Major
Found in scripts.js and 1 other location - About 4 days to fix
scripts.js on lines 712..792

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 790.

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.keypress.left && data.runner.cango.left) {

        data.runner.position.left--;

        setTimeout(function () {
Severity: Major
Found in scripts.js and 1 other location - About 4 days to fix
scripts.js on lines 750..792

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 790.

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.walls[data.temp.iOfInit2_2][2] == data.temp.setEnemys[data.iOfInit2][2]) {
                        if (data.walls[data.temp.iOfInit2_2][1] > data.temp.setEnemys[data.iOfInit2][1] && data.walls[data.temp.iOfInit2_2][1] < data.temp.setEnemys[data.iOfInit2][5]) {
                            data.temp.setEnemys[data.iOfInit2][5] = data.walls[data.temp.iOfInit2_2][1];
                        }

Severity: Major
Found in scripts.js and 1 other location - About 1 day to fix
scripts.js on lines 159..167

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 296.

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

                    } else if (data.walls[data.temp.iOfInit2_2][1] == data.temp.setEnemys[data.iOfInit2][1]) {
                        if (data.walls[data.temp.iOfInit2_2][2] > data.temp.setEnemys[data.iOfInit2][2] && data.walls[data.temp.iOfInit2_2][2] < data.temp.setEnemys[data.iOfInit2][6]) {
                            data.temp.setEnemys[data.iOfInit2][6] = data.walls[data.temp.iOfInit2_2][2];
                        }

Severity: Major
Found in scripts.js and 1 other location - About 1 day to fix
scripts.js on lines 151..167

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 296.

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.keypress.up && data.keypress.right) {
            if (data.runner.position.left == data.walls[data.temp.iOfTick][1] - 1 && data.runner.position.top == data.walls[data.temp.iOfTick][2] + 1) {
                data.runner.cango.right = 0;
            }
        } else if (data.keypress.up && data.keypress.left) {
Severity: Major
Found in scripts.js and 1 other location - About 1 day to fix
scripts.js on lines 486..494

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 275.

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.keypress.down && data.keypress.right) {
            if (data.runner.position.left == data.walls[data.temp.iOfTick][1] - 1 && data.runner.position.top == data.walls[data.temp.iOfTick][2] - 1) {
                data.runner.cango.right = 0;
            }
        } else if (data.keypress.down && data.keypress.left) {
Severity: Major
Found in scripts.js and 1 other location - About 1 day to fix
scripts.js on lines 496..504

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 275.

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

window.addEventListener("resize",function() {
    objects.field.style.top = objects.gameframe.offsetHeight / 2 - data.runner.position.top * data.field.oneHeight - data.field.oneHeight * .5 + "px";
    objects.field.style.left = objects.gameframe.offsetWidth / 2 - data.runner.position.left * data.field.oneWidth - data.field.oneWidth * .5 + "px";
});
Severity: Major
Found in scripts2.js and 1 other location - About 6 hrs to fix
scripts2.js on lines 6..9

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 166.

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

addEventListener("focus",function() {
    objects.field.style.top = objects.gameframe.offsetHeight / 2 - data.runner.position.top * data.field.oneHeight - data.field.oneHeight * .5 + "px";
    objects.field.style.left = objects.gameframe.offsetWidth / 2 - data.runner.position.left * data.field.oneWidth - data.field.oneWidth * .5 + "px";
});
Severity: Major
Found in scripts2.js and 1 other location - About 6 hrs to fix
scripts2.js on lines 1..4

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 166.

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

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] == "left") {
                if (data.enemys[data.forenemys[data.temp.iOfEnemyTick]][1] > +data.enemys[data.forenemys[data.temp.iOfEnemyTick]][3] + 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 902..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

            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 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

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][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][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

Severity
Category
Status
Source
Language