ocadotechnology/rapid-router

View on GitHub

Showing 664 of 1,362 total issues

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

            $(that.dom.grid.left.liner)
                .on( 'mouseover.DTFC touchstart.DTFC', function () {
                    mouseController = 'left';
                } )
                .on( 'scroll.DTFC', function () {
Severity: Major
Found in game/static/game/js/dataTables.fixedColumns.js and 1 other location - About 7 hrs to fix
game/static/game/js/dataTables.fixedColumns.js on lines 517..535

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

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

            $(that.dom.grid.right.liner)
                .on( 'mouseover.DTFC touchstart.DTFC', function () {
                    mouseController = 'right';
                } )
                .on( 'scroll.DTFC', function () {
Severity: Major
Found in game/static/game/js/dataTables.fixedColumns.js and 1 other location - About 7 hrs to fix
game/static/game/js/dataTables.fixedColumns.js on lines 494..512

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

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 (!self.rtl) {
          section.css({left : -(100 * topbar.data('index')) + '%'});
          section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
        } else {
          section.css({right : -(100 * topbar.data('index')) + '%'});
game/static/game/js/foundation/foundation/foundation.topbar.js on lines 234..240

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

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 (!self.rtl) {
              section.css({left : -(100 * topbar.data('index')) + '%'});
              section.find('>.name').css({left : 100 * topbar.data('index') + '%'});
            } else {
              section.css({right : -(100 * topbar.data('index')) + '%'});
game/static/game/js/foundation/foundation/foundation.topbar.js on lines 276..282

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

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 15 locations. Consider refactoring.
Open

    def create_level79():
        level79 = Level(
            name="79",
            default=True,
            path='[{"coordinate":[9,0],"connectedNodes":[76]},{"coordinate":[2,5],"connectedNodes":[77,2]},{"coordinate":[2,4],"connectedNodes":[1,5]},{"coordinate":[1,4],"connectedNodes":[15,4]},{"coordinate":[1,3],"connectedNodes":[3,5]},{"coordinate":[2,3],"connectedNodes":[4,2,6]},{"coordinate":[3,3],"connectedNodes":[5,7]},{"coordinate":[3,4],"connectedNodes":[8,6]},{"coordinate":[3,5],"connectedNodes":[10,22,7]},{"coordinate":[2,6],"connectedNodes":[11,10]},{"coordinate":[3,6],"connectedNodes":[9,8]},{"coordinate":[1,6],"connectedNodes":[12,9]},{"coordinate":[1,7],"connectedNodes":[13,18,11]},{"coordinate":[0,7],"connectedNodes":[12,14]},{"coordinate":[0,6],"connectedNodes":[13,17]},{"coordinate":[0,4],"connectedNodes":[3,16]},{"coordinate":[0,3],"connectedNodes":[15,73]},{"coordinate":[0,5],"connectedNodes":[14,77]},{"coordinate":[2,7],"connectedNodes":[12,19]},{"coordinate":[3,7],"connectedNodes":[18,20]},{"coordinate":[4,7],"connectedNodes":[19,21]},{"coordinate":[4,6],"connectedNodes":[20,24]},{"coordinate":[4,5],"connectedNodes":[8,23]},{"coordinate":[5,5],"connectedNodes":[22,28,43]},{"coordinate":[5,6],"connectedNodes":[21,25]},{"coordinate":[5,7],"connectedNodes":[26,24]},{"coordinate":[6,7],"connectedNodes":[25,27]},{"coordinate":[6,6],"connectedNodes":[26,30]},{"coordinate":[6,5],"connectedNodes":[23,29]},{"coordinate":[6,4],"connectedNodes":[28,39]},{"coordinate":[7,6],"connectedNodes":[27,31]},{"coordinate":[8,6],"connectedNodes":[30,35]},{"coordinate":[8,7],"connectedNodes":[33,34]},{"coordinate":[7,7],"connectedNodes":[32]},{"coordinate":[9,7],"connectedNodes":[32,35]},{"coordinate":[9,6],"connectedNodes":[31,34,36]},{"coordinate":[9,5],"connectedNodes":[35,37]},{"coordinate":[9,4],"connectedNodes":[38,36,49]},{"coordinate":[8,4],"connectedNodes":[39,41,37]},{"coordinate":[7,4],"connectedNodes":[29,38]},{"coordinate":[7,5],"connectedNodes":[41]},{"coordinate":[8,5],"connectedNodes":[40,38]},{"coordinate":[4,4],"connectedNodes":[43,45]},{"coordinate":[5,4],"connectedNodes":[42,23]},{"coordinate":[5,3],"connectedNodes":[45,46,54]},{"coordinate":[4,3],"connectedNodes":[42,44]},{"coordinate":[6,3],"connectedNodes":[44,47,53]},{"coordinate":[7,3],"connectedNodes":[46,48]},{"coordinate":[8,3],"connectedNodes":[47,49]},{"coordinate":[9,3],"connectedNodes":[48,37,50]},{"coordinate":[9,2],"connectedNodes":[51,49,76]},{"coordinate":[8,2],"connectedNodes":[50]},{"coordinate":[7,2],"connectedNodes":[53]},{"coordinate":[6,2],"connectedNodes":[46,52]},{"coordinate":[5,2],"connectedNodes":[55,44]},{"coordinate":[4,2],"connectedNodes":[54]},{"coordinate":[3,2],"connectedNodes":[69,57]},{"coordinate":[3,1],"connectedNodes":[56,58]},{"coordinate":[4,1],"connectedNodes":[57,59]},{"coordinate":[5,1],"connectedNodes":[58,60]},{"coordinate":[6,1],"connectedNodes":[59,63]},{"coordinate":[7,1],"connectedNodes":[78,62]},{"coordinate":[7,0],"connectedNodes":[63,61]},{"coordinate":[6,0],"connectedNodes":[64,60,62]},{"coordinate":[5,0],"connectedNodes":[65,63]},{"coordinate":[4,0],"connectedNodes":[66,64]},{"coordinate":[3,0],"connectedNodes":[68,65]},{"coordinate":[2,1],"connectedNodes":[68]},{"coordinate":[2,0],"connectedNodes":[75,67,66]},{"coordinate":[2,2],"connectedNodes":[70,56]},{"coordinate":[1,2],"connectedNodes":[73,69,71]},{"coordinate":[1,1],"connectedNodes":[72,70]},{"coordinate":[0,1],"connectedNodes":[71,74]},{"coordinate":[0,2],"connectedNodes":[16,70]},{"coordinate":[0,0],"connectedNodes":[72,75]},{"coordinate":[1,0],"connectedNodes":[74,68]},{"coordinate":[9,1],"connectedNodes":[50,0]},{"coordinate":[1,5],"connectedNodes":[17,1]},{"coordinate":[8,1],"connectedNodes":[61,79]},{"coordinate":[8,0],"connectedNodes":[78]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116

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 15 locations. Consider refactoring.
Open

    def create_level66():
        level66 = Level(
            name="66",
            default=True,
            path='[{"coordinate":[1,5],"connectedNodes":[1]},{"coordinate":[2,5],"connectedNodes":[0,2]},{"coordinate":[3,5],"connectedNodes":[1,3]},{"coordinate":[4,5],"connectedNodes":[2,4]},{"coordinate":[4,4],"connectedNodes":[3,5]},{"coordinate":[5,4],"connectedNodes":[4,6]},{"coordinate":[6,4],"connectedNodes":[5,7]},{"coordinate":[7,4],"connectedNodes":[6,8]},{"coordinate":[8,4],"connectedNodes":[7,9]},{"coordinate":[8,3],"connectedNodes":[8,10]},{"coordinate":[8,2],"connectedNodes":[9,11]},{"coordinate":[8,1],"connectedNodes":[12,10]},{"coordinate":[7,1],"connectedNodes":[13,11]},{"coordinate":[6,1],"connectedNodes":[14,12]},{"coordinate":[5,1],"connectedNodes":[15,13]},{"coordinate":[4,1],"connectedNodes":[16,14]},{"coordinate":[4,2],"connectedNodes":[17,15]},{"coordinate":[3,2],"connectedNodes":[18,16]},{"coordinate":[2,2],"connectedNodes":[19,17]},{"coordinate":[1,2],"connectedNodes":[20,18]},{"coordinate":[1,3],"connectedNodes":[19]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level56():
        level56 = Level(
            name="56",
            default=True,
            path='[{"coordinate":[1,6],"connectedNodes":[25]},{"coordinate":[3,5],"connectedNodes":[26,2]},{"coordinate":[4,5],"connectedNodes":[1,3]},{"coordinate":[4,6],"connectedNodes":[4,2]},{"coordinate":[4,7],"connectedNodes":[5,3]},{"coordinate":[5,7],"connectedNodes":[4,6]},{"coordinate":[6,7],"connectedNodes":[5,7]},{"coordinate":[7,7],"connectedNodes":[6,8]},{"coordinate":[7,6],"connectedNodes":[7,9]},{"coordinate":[7,5],"connectedNodes":[8,10]},{"coordinate":[7,4],"connectedNodes":[9,11]},{"coordinate":[7,3],"connectedNodes":[12,10]},{"coordinate":[6,3],"connectedNodes":[13,11]},{"coordinate":[5,3],"connectedNodes":[14,12]},{"coordinate":[4,3],"connectedNodes":[15,13]},{"coordinate":[3,3],"connectedNodes":[16,14]},{"coordinate":[2,3],"connectedNodes":[15,17]},{"coordinate":[2,2],"connectedNodes":[16,18]},{"coordinate":[2,1],"connectedNodes":[17,19]},{"coordinate":[3,1],"connectedNodes":[18,20]},{"coordinate":[4,1],"connectedNodes":[19,21]},{"coordinate":[5,1],"connectedNodes":[20,22]},{"coordinate":[6,1],"connectedNodes":[21,23]},{"coordinate":[7,1],"connectedNodes":[22,24]},{"coordinate":[7,2],"connectedNodes":[23]},{"coordinate":[2,6],"connectedNodes":[0,26]},{"coordinate":[2,5],"connectedNodes":[25,1]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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

    def create_level71():
        level71 = Level(
            name="71",
            default=True,
            path='[{"coordinate":[1,2],"connectedNodes":[2]},{"coordinate":[2,4],"connectedNodes":[3,4,12]},{"coordinate":[1,3],"connectedNodes":[3,0]},{"coordinate":[1,4],"connectedNodes":[1,2]},{"coordinate":[2,5],"connectedNodes":[5,1]},{"coordinate":[2,6],"connectedNodes":[11,6,4]},{"coordinate":[3,6],"connectedNodes":[5,7]},{"coordinate":[4,6],"connectedNodes":[6,8]},{"coordinate":[4,5],"connectedNodes":[7,9]},{"coordinate":[4,4],"connectedNodes":[10,8]},{"coordinate":[3,4],"connectedNodes":[9]},{"coordinate":[1,6],"connectedNodes":[5]},{"coordinate":[2,3],"connectedNodes":[1]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 1 other location - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 2700..2728

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 15 locations. Consider refactoring.
Open

    def create_level73():
        level73 = Level(
            name="73",
            default=True,
            path='[{"coordinate":[8,1],"connectedNodes":[47]},{"coordinate":[5,5],"connectedNodes":[2,12]},{"coordinate":[4,5],"connectedNodes":[3,1,48]},{"coordinate":[3,5],"connectedNodes":[2,4]},{"coordinate":[3,4],"connectedNodes":[3,5]},{"coordinate":[3,3],"connectedNodes":[4,6]},{"coordinate":[4,3],"connectedNodes":[5,7,21]},{"coordinate":[5,3],"connectedNodes":[6,8]},{"coordinate":[6,3],"connectedNodes":[7,9]},{"coordinate":[6,4],"connectedNodes":[10,8]},{"coordinate":[6,5],"connectedNodes":[11,9]},{"coordinate":[6,6],"connectedNodes":[12,10]},{"coordinate":[5,6],"connectedNodes":[13,11,1]},{"coordinate":[4,6],"connectedNodes":[14,12]},{"coordinate":[3,6],"connectedNodes":[15,13]},{"coordinate":[2,6],"connectedNodes":[14,16]},{"coordinate":[2,5],"connectedNodes":[15,17]},{"coordinate":[2,4],"connectedNodes":[16,18]},{"coordinate":[2,3],"connectedNodes":[39,17,19]},{"coordinate":[2,2],"connectedNodes":[18,20]},{"coordinate":[3,2],"connectedNodes":[19,21]},{"coordinate":[4,2],"connectedNodes":[20,6,22]},{"coordinate":[5,2],"connectedNodes":[21,23]},{"coordinate":[6,2],"connectedNodes":[22,24]},{"coordinate":[7,2],"connectedNodes":[23,25]},{"coordinate":[7,3],"connectedNodes":[26,24]},{"coordinate":[7,4],"connectedNodes":[27,25]},{"coordinate":[7,5],"connectedNodes":[28,26]},{"coordinate":[7,6],"connectedNodes":[29,27]},{"coordinate":[7,7],"connectedNodes":[30,28]},{"coordinate":[6,7],"connectedNodes":[31,29]},{"coordinate":[5,7],"connectedNodes":[32,30]},{"coordinate":[4,7],"connectedNodes":[33,31]},{"coordinate":[3,7],"connectedNodes":[34,32]},{"coordinate":[2,7],"connectedNodes":[35,33]},{"coordinate":[1,7],"connectedNodes":[34,36]},{"coordinate":[1,6],"connectedNodes":[35,37]},{"coordinate":[1,5],"connectedNodes":[36,38]},{"coordinate":[1,4],"connectedNodes":[37,39]},{"coordinate":[1,3],"connectedNodes":[38,18,40]},{"coordinate":[1,2],"connectedNodes":[39,41]},{"coordinate":[1,1],"connectedNodes":[40,42]},{"coordinate":[2,1],"connectedNodes":[41,43]},{"coordinate":[3,1],"connectedNodes":[42,44]},{"coordinate":[4,1],"connectedNodes":[43,45]},{"coordinate":[5,1],"connectedNodes":[44,46]},{"coordinate":[6,1],"connectedNodes":[45,47]},{"coordinate":[7,1],"connectedNodes":[46,0]},{"coordinate":[4,4],"connectedNodes":[2,49]},{"coordinate":[5,4],"connectedNodes":[48]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level57():
        level57 = Level(
            name="57",
            default=True,
            path='[{"coordinate":[1,6],"connectedNodes":[1]},{"coordinate":[2,6],"connectedNodes":[0,2]},{"coordinate":[2,5],"connectedNodes":[1,3]},{"coordinate":[2,4],"connectedNodes":[2,4]},{"coordinate":[3,4],"connectedNodes":[3,5]},{"coordinate":[4,4],"connectedNodes":[4,6]},{"coordinate":[4,5],"connectedNodes":[7,5]},{"coordinate":[4,6],"connectedNodes":[8,6]},{"coordinate":[4,7],"connectedNodes":[9,7]},{"coordinate":[5,7],"connectedNodes":[8,10]},{"coordinate":[5,6],"connectedNodes":[9,11]},{"coordinate":[5,5],"connectedNodes":[10,12]},{"coordinate":[6,5],"connectedNodes":[11,13]},{"coordinate":[6,6],"connectedNodes":[14,12]},{"coordinate":[7,6],"connectedNodes":[13,15]},{"coordinate":[7,5],"connectedNodes":[14,16]},{"coordinate":[8,5],"connectedNodes":[15,17]},{"coordinate":[8,4],"connectedNodes":[18,16]},{"coordinate":[7,4],"connectedNodes":[17,19]},{"coordinate":[7,3],"connectedNodes":[20,18]},{"coordinate":[6,3],"connectedNodes":[21,19]},{"coordinate":[5,3],"connectedNodes":[20,22]},{"coordinate":[5,2],"connectedNodes":[23,21]},{"coordinate":[4,2],"connectedNodes":[24,22]},{"coordinate":[3,2],"connectedNodes":[23]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level72():
        level72 = Level(
            name="72",
            default=True,
            path='[{"coordinate":[1,5],"connectedNodes":[1]},{"coordinate":[2,5],"connectedNodes":[0,2]},{"coordinate":[3,5],"connectedNodes":[1,3]},{"coordinate":[4,5],"connectedNodes":[2,17,4]},{"coordinate":[5,5],"connectedNodes":[3,5]},{"coordinate":[6,5],"connectedNodes":[4,28,19,6]},{"coordinate":[6,4],"connectedNodes":[5,7]},{"coordinate":[6,3],"connectedNodes":[6,8]},{"coordinate":[6,2],"connectedNodes":[7,9]},{"coordinate":[6,1],"connectedNodes":[10,8,25]},{"coordinate":[5,1],"connectedNodes":[11,9]},{"coordinate":[4,1],"connectedNodes":[12,10]},{"coordinate":[3,1],"connectedNodes":[13,11]},{"coordinate":[2,1],"connectedNodes":[14,12]},{"coordinate":[1,1],"connectedNodes":[29,15,13]},{"coordinate":[1,2],"connectedNodes":[35,16,14]},{"coordinate":[2,2],"connectedNodes":[15]},{"coordinate":[4,6],"connectedNodes":[18,3]},{"coordinate":[4,7],"connectedNodes":[26,17]},{"coordinate":[7,5],"connectedNodes":[5,20]},{"coordinate":[8,5],"connectedNodes":[19,21]},{"coordinate":[8,4],"connectedNodes":[20,22]},{"coordinate":[8,3],"connectedNodes":[21,23]},{"coordinate":[8,2],"connectedNodes":[22,24]},{"coordinate":[8,1],"connectedNodes":[25,23]},{"coordinate":[7,1],"connectedNodes":[9,24]},{"coordinate":[5,7],"connectedNodes":[18,27]},{"coordinate":[6,7],"connectedNodes":[26,28]},{"coordinate":[6,6],"connectedNodes":[27,5]},{"coordinate":[0,1],"connectedNodes":[14,30]},{"coordinate":[0,0],"connectedNodes":[29,31]},{"coordinate":[1,0],"connectedNodes":[30,32]},{"coordinate":[2,0],"connectedNodes":[31,33]},{"coordinate":[3,0],"connectedNodes":[32,34]},{"coordinate":[4,0],"connectedNodes":[33]},{"coordinate":[1,3],"connectedNodes":[36,15]},{"coordinate":[2,3],"connectedNodes":[35,37]},{"coordinate":[3,3],"connectedNodes":[36,38]},{"coordinate":[4,3],"connectedNodes":[37,39]},{"coordinate":[5,3],"connectedNodes":[38]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level74():
        level74 = Level(
            name="74",
            default=True,
            path='[{"coordinate":[9,2],"connectedNodes":[1]},{"coordinate":[8,2],"connectedNodes":[2,18,0]},{"coordinate":[7,2],"connectedNodes":[1,3]},{"coordinate":[7,1],"connectedNodes":[4,2]},{"coordinate":[6,1],"connectedNodes":[5,3,6]},{"coordinate":[5,1],"connectedNodes":[16,7,4]},{"coordinate":[6,0],"connectedNodes":[4]},{"coordinate":[5,2],"connectedNodes":[8,10,5]},{"coordinate":[4,2],"connectedNodes":[15,9,7,16]},{"coordinate":[4,3],"connectedNodes":[12,10,8]},{"coordinate":[5,3],"connectedNodes":[9,11,7]},{"coordinate":[5,4],"connectedNodes":[12,10]},{"coordinate":[4,4],"connectedNodes":[13,11,9]},{"coordinate":[3,4],"connectedNodes":[42,12,14]},{"coordinate":[3,3],"connectedNodes":[13,15]},{"coordinate":[3,2],"connectedNodes":[37,14,8]},{"coordinate":[4,1],"connectedNodes":[8,5,17]},{"coordinate":[4,0],"connectedNodes":[16]},{"coordinate":[8,3],"connectedNodes":[19,1]},{"coordinate":[8,4],"connectedNodes":[20,18]},{"coordinate":[8,5],"connectedNodes":[21,43,19]},{"coordinate":[8,6],"connectedNodes":[22,20]},{"coordinate":[7,6],"connectedNodes":[23,21]},{"coordinate":[6,6],"connectedNodes":[24,22]},{"coordinate":[5,6],"connectedNodes":[25,23,38]},{"coordinate":[4,6],"connectedNodes":[26,24]},{"coordinate":[3,6],"connectedNodes":[27,25]},{"coordinate":[2,6],"connectedNodes":[28,39,26]},{"coordinate":[1,6],"connectedNodes":[29,27]},{"coordinate":[0,6],"connectedNodes":[28,30]},{"coordinate":[0,5],"connectedNodes":[29,31]},{"coordinate":[0,4],"connectedNodes":[30,40,32]},{"coordinate":[0,3],"connectedNodes":[31,33]},{"coordinate":[0,2],"connectedNodes":[32,34]},{"coordinate":[0,1],"connectedNodes":[33,35]},{"coordinate":[1,1],"connectedNodes":[34,36,41]},{"coordinate":[2,1],"connectedNodes":[35,37]},{"coordinate":[2,2],"connectedNodes":[15,36]},{"coordinate":[5,5],"connectedNodes":[24]},{"coordinate":[2,7],"connectedNodes":[27]},{"coordinate":[1,4],"connectedNodes":[31]},{"coordinate":[1,0],"connectedNodes":[35]},{"coordinate":[3,5],"connectedNodes":[13]},{"coordinate":[9,5],"connectedNodes":[20]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level55():
        level55 = Level(
            name="55",
            default=True,
            path='[{"coordinate":[2,6],"connectedNodes":[18]},{"coordinate":[3,6],"connectedNodes":[2,19]},{"coordinate":[4,6],"connectedNodes":[1,3]},{"coordinate":[4,7],"connectedNodes":[4,2]},{"coordinate":[5,7],"connectedNodes":[3,5]},{"coordinate":[5,6],"connectedNodes":[4,6]},{"coordinate":[6,6],"connectedNodes":[5,7]},{"coordinate":[6,5],"connectedNodes":[6,8]},{"coordinate":[7,5],"connectedNodes":[7,9]},{"coordinate":[7,4],"connectedNodes":[10,8]},{"coordinate":[6,4],"connectedNodes":[9,11]},{"coordinate":[6,3],"connectedNodes":[12,10]},{"coordinate":[5,3],"connectedNodes":[11,13]},{"coordinate":[5,2],"connectedNodes":[14,12]},{"coordinate":[4,2],"connectedNodes":[15,13]},{"coordinate":[4,3],"connectedNodes":[16,14]},{"coordinate":[3,3],"connectedNodes":[17,15]},{"coordinate":[3,4],"connectedNodes":[20,16]},{"coordinate":[2,5],"connectedNodes":[0,19]},{"coordinate":[3,5],"connectedNodes":[18,1]},{"coordinate":[2,4],"connectedNodes":[17,21]},{"coordinate":[2,3],"connectedNodes":[20]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level52():
        level52 = Level(
            name="52",
            default=True,
            path='[{"coordinate":[0,3],"connectedNodes":[1]},{"coordinate":[1,3],"connectedNodes":[0,8,2,18]},{"coordinate":[2,3],"connectedNodes":[1,3]},{"coordinate":[3,3],"connectedNodes":[2,4]},{"coordinate":[4,3],"connectedNodes":[3,5]},{"coordinate":[5,3],"connectedNodes":[4,6]},{"coordinate":[6,3],"connectedNodes":[5,17,7,25]},{"coordinate":[7,3],"connectedNodes":[6]},{"coordinate":[1,4],"connectedNodes":[9,1]},{"coordinate":[2,4],"connectedNodes":[8,10]},{"coordinate":[2,5],"connectedNodes":[11,9]},{"coordinate":[3,5],"connectedNodes":[10,12]},{"coordinate":[3,6],"connectedNodes":[13,11]},{"coordinate":[4,6],"connectedNodes":[12,14]},{"coordinate":[4,5],"connectedNodes":[13,15]},{"coordinate":[5,5],"connectedNodes":[14,16]},{"coordinate":[5,4],"connectedNodes":[15,17]},{"coordinate":[6,4],"connectedNodes":[16,6]},{"coordinate":[1,2],"connectedNodes":[1,19]},{"coordinate":[2,2],"connectedNodes":[18,20]},{"coordinate":[3,2],"connectedNodes":[19,21]},{"coordinate":[3,1],"connectedNodes":[20,22]},{"coordinate":[4,1],"connectedNodes":[21,23]},{"coordinate":[5,1],"connectedNodes":[22,24]},{"coordinate":[6,1],"connectedNodes":[23,25]},{"coordinate":[6,2],"connectedNodes":[6,24]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level61():
        level61 = Level(
            name="61",
            default=True,
            path='[{"coordinate":[0,5],"connectedNodes":[1]},{"coordinate":[1,5],"connectedNodes":[0,2]},{"coordinate":[2,5],"connectedNodes":[1,3]},{"coordinate":[2,6],"connectedNodes":[4,2]},{"coordinate":[3,6],"connectedNodes":[3,5]},{"coordinate":[3,5],"connectedNodes":[4,6]},{"coordinate":[4,5],"connectedNodes":[5,7]},{"coordinate":[5,5],"connectedNodes":[6,8]},{"coordinate":[6,5],"connectedNodes":[7,9]},{"coordinate":[6,6],"connectedNodes":[10,8]},{"coordinate":[7,6],"connectedNodes":[9,11]},{"coordinate":[7,5],"connectedNodes":[10,12]},{"coordinate":[8,5],"connectedNodes":[11]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level64():
        level64 = Level(
            name="64",
            default=True,
            path='[{"coordinate":[1,4],"connectedNodes":[1]},{"coordinate":[2,4],"connectedNodes":[0,2]},{"coordinate":[2,5],"connectedNodes":[3,1]},{"coordinate":[3,5],"connectedNodes":[2,4]},{"coordinate":[4,5],"connectedNodes":[3,5]},{"coordinate":[4,4],"connectedNodes":[4,6]},{"coordinate":[5,4],"connectedNodes":[5,7]},{"coordinate":[6,4],"connectedNodes":[6,8]},{"coordinate":[6,5],"connectedNodes":[9,7]},{"coordinate":[7,5],"connectedNodes":[8,10]},{"coordinate":[8,5],"connectedNodes":[9,11]},{"coordinate":[8,4],"connectedNodes":[10,12]},{"coordinate":[9,4],"connectedNodes":[11,13]},{"coordinate":[9,3],"connectedNodes":[12,14]},{"coordinate":[9,2],"connectedNodes":[15,13]},{"coordinate":[8,2],"connectedNodes":[16,14]},{"coordinate":[7,2],"connectedNodes":[17,15]},{"coordinate":[7,3],"connectedNodes":[18,16]},{"coordinate":[6,3],"connectedNodes":[17,19]},{"coordinate":[6,2],"connectedNodes":[20,18]},{"coordinate":[5,2],"connectedNodes":[19,21]},{"coordinate":[5,1],"connectedNodes":[22,20]},{"coordinate":[4,1],"connectedNodes":[23,21]},{"coordinate":[3,1],"connectedNodes":[24,22]},{"coordinate":[3,2],"connectedNodes":[25,23]},{"coordinate":[2,2],"connectedNodes":[26,24]},{"coordinate":[2,3],"connectedNodes":[27,25]},{"coordinate":[1,3],"connectedNodes":[26,28]},{"coordinate":[1,2],"connectedNodes":[29,27]},{"coordinate":[0,2],"connectedNodes":[28]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level75():
        level75 = Level(
            name="75",
            default=True,
            path='[{"coordinate":[1,6],"connectedNodes":[18]},{"coordinate":[2,5],"connectedNodes":[18,2]},{"coordinate":[2,6],"connectedNodes":[3,1]},{"coordinate":[3,6],"connectedNodes":[2,4]},{"coordinate":[3,5],"connectedNodes":[3,5]},{"coordinate":[3,4],"connectedNodes":[4,6]},{"coordinate":[3,3],"connectedNodes":[5,7]},{"coordinate":[3,2],"connectedNodes":[6,8]},{"coordinate":[4,2],"connectedNodes":[7,9]},{"coordinate":[4,3],"connectedNodes":[10,8]},{"coordinate":[4,4],"connectedNodes":[11,9]},{"coordinate":[4,5],"connectedNodes":[12,10]},{"coordinate":[4,6],"connectedNodes":[13,11]},{"coordinate":[5,6],"connectedNodes":[12,14]},{"coordinate":[5,5],"connectedNodes":[13,15]},{"coordinate":[5,4],"connectedNodes":[14,16]},{"coordinate":[5,3],"connectedNodes":[15,17]},{"coordinate":[5,2],"connectedNodes":[16]},{"coordinate":[1,5],"connectedNodes":[0,1]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level54():
        level54 = Level(
            name="54",
            default=True,
            path='[{"coordinate":[0,3],"connectedNodes":[1]},{"coordinate":[1,3],"connectedNodes":[0,9,2,18]},{"coordinate":[2,3],"connectedNodes":[1,10,3,19]},{"coordinate":[3,3],"connectedNodes":[2,11,4,20]},{"coordinate":[4,3],"connectedNodes":[3,12,5,21]},{"coordinate":[5,3],"connectedNodes":[4,13,6,22]},{"coordinate":[6,3],"connectedNodes":[5,14,7,23]},{"coordinate":[7,3],"connectedNodes":[6,15,8,24]},{"coordinate":[8,3],"connectedNodes":[7,16,17,25]},{"coordinate":[1,4],"connectedNodes":[10,1]},{"coordinate":[2,4],"connectedNodes":[9,2]},{"coordinate":[3,4],"connectedNodes":[12,3]},{"coordinate":[4,4],"connectedNodes":[11,4]},{"coordinate":[5,4],"connectedNodes":[14,5]},{"coordinate":[6,4],"connectedNodes":[13,6]},{"coordinate":[7,4],"connectedNodes":[16,7]},{"coordinate":[8,4],"connectedNodes":[15,8]},{"coordinate":[9,3],"connectedNodes":[8]},{"coordinate":[1,2],"connectedNodes":[1,19]},{"coordinate":[2,2],"connectedNodes":[18,2]},{"coordinate":[3,2],"connectedNodes":[3,21]},{"coordinate":[4,2],"connectedNodes":[20,4]},{"coordinate":[5,2],"connectedNodes":[5,23]},{"coordinate":[6,2],"connectedNodes":[22,6]},{"coordinate":[7,2],"connectedNodes":[7,25]},{"coordinate":[8,2],"connectedNodes":[24,8]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3878..3906
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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 15 locations. Consider refactoring.
Open

    def create_level58():
        level58 = Level(
            name="58",
            default=True,
            path='[{"coordinate":[6,6],"connectedNodes":[1]},{"coordinate":[5,6],"connectedNodes":[2,0]},{"coordinate":[4,6],"connectedNodes":[3,1]},{"coordinate":[3,6],"connectedNodes":[4,2]},{"coordinate":[2,6],"connectedNodes":[5,3]},{"coordinate":[1,6],"connectedNodes":[4,6]},{"coordinate":[1,5],"connectedNodes":[5,7]},{"coordinate":[2,5],"connectedNodes":[6,8]},{"coordinate":[3,5],"connectedNodes":[7,9]},{"coordinate":[4,5],"connectedNodes":[8,10]},{"coordinate":[5,5],"connectedNodes":[9,11]},{"coordinate":[6,5],"connectedNodes":[10,12]},{"coordinate":[6,4],"connectedNodes":[13,11]},{"coordinate":[5,4],"connectedNodes":[14,12]},{"coordinate":[4,4],"connectedNodes":[15,13]},{"coordinate":[3,4],"connectedNodes":[16,14]},{"coordinate":[2,4],"connectedNodes":[17,15]},{"coordinate":[1,4],"connectedNodes":[16,18]},{"coordinate":[1,3],"connectedNodes":[17,19]},{"coordinate":[2,3],"connectedNodes":[18,20]},{"coordinate":[3,3],"connectedNodes":[19,21]},{"coordinate":[4,3],"connectedNodes":[20,22]},{"coordinate":[5,3],"connectedNodes":[21,23]},{"coordinate":[6,3],"connectedNodes":[22,24]},{"coordinate":[6,2],"connectedNodes":[25,23]},{"coordinate":[5,2],"connectedNodes":[24]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 14 other locations - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3698..3726
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3728..3756
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3758..3786
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3788..3816
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3818..3846
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3848..3876
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3908..3936
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3938..3966
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3968..3996
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 3998..4026
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4028..4056
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4058..4086
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4088..4116
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 4118..4141

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

    def create_level60():
        level60 = Level(
            name="60",
            default=True,
            path='[{"coordinate":[0,2],"connectedNodes":[18]},{"coordinate":[5,3],"connectedNodes":[16,2]},{"coordinate":[5,2],"connectedNodes":[5,1,12]},{"coordinate":[2,2],"connectedNodes":[18,4]},{"coordinate":[3,2],"connectedNodes":[3,5]},{"coordinate":[4,2],"connectedNodes":[4,2]},{"coordinate":[5,5],"connectedNodes":[7,16]},{"coordinate":[5,6],"connectedNodes":[9,8,6]},{"coordinate":[6,6],"connectedNodes":[7]},{"coordinate":[4,6],"connectedNodes":[10,7]},{"coordinate":[3,6],"connectedNodes":[11,9]},{"coordinate":[2,6],"connectedNodes":[14,10]},{"coordinate":[5,1],"connectedNodes":[2]},{"coordinate":[1,7],"connectedNodes":[14]},{"coordinate":[1,6],"connectedNodes":[13,11,15]},{"coordinate":[1,5],"connectedNodes":[14,17]},{"coordinate":[5,4],"connectedNodes":[6,1]},{"coordinate":[1,4],"connectedNodes":[15]},{"coordinate":[1,2],"connectedNodes":[0,3]}]',
Severity: Major
Found in game/migrations/0001_squashed_0025_levels_ordering_pt1.py and 1 other location - About 6 hrs to fix
game/migrations/0001_squashed_0025_levels_ordering_pt1.py on lines 2826..2854

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

Severity
Category
Status
Source
Language