ocadotechnology/rapid-router

View on GitHub
game/decor.py

Summary

Maintainability
D
2 days
Test Coverage

File decor.py has 358 lines of code (exceeds 250 allowed). Consider refactoring.
Confirmed

"""
    Decor data
"""

from builtins import object
Severity: Minor
Found in game/decor.py - About 4 hrs to fix

    Function __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, pk, name, url, xmas_url, width, height, theme, z_index):
    Severity: Major
    Found in game/decor.py - About 1 hr to fix

      Function get_decor_element has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      def get_decor_element(name, theme):
          """Helper method to get a decor element corresponding to the theme or a default one."""
          try:
              return DECOR_DATA[(name, theme.name)]
          except KeyError:
      Severity: Minor
      Found in game/decor.py - About 25 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

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

      def get_decor_element_by_pk(pk):
          for decor in list(DECOR_DATA.values()):
              if decor.pk == int(pk):
                  return decor
          raise KeyError
      Severity: Major
      Found in game/decor.py and 2 other locations - About 1 hr to fix
      game/character.py on lines 82..86
      game/theme.py on lines 65..69

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

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

          ("tile1", "grass"): Decor(
              z_index=0,
              name="tile1",
              url="decor/grass/tile1.svg",
              xmas_url="decor/snow/tile1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("cfc", "farm"): Decor(
              z_index=1,
              name="cfc",
              url="decor/farm/cfc.svg",
              xmas_url="decor/snow/barn.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree1", "farm"): Decor(
              z_index=4,
              name="tree1",
              url="decor/farm/tree1.svg",
              xmas_url="decor/snow/tree1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("pond", "grass"): Decor(
              z_index=2,
              name="pond",
              url="decor/grass/pond.svg",
              xmas_url="decor/snow/pond.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("pond", "snow"): Decor(
              z_index=2,
              name="pond",
              url="decor/snow/pond.svg",
              xmas_url="decor/snow/pond.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree1", "snow"): Decor(
              z_index=4,
              name="tree1",
              url="decor/snow/tree1.svg",
              xmas_url="decor/snow/tree1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("pond", "city"): Decor(
              z_index=2,
              name="pond",
              url="decor/city/hospital.svg",
              xmas_url="decor/snow/hospital.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree1", "grass"): Decor(
              z_index=4,
              name="tree1",
              url="decor/grass/tree1.svg",
              xmas_url="decor/snow/tree1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("house", "grass"): Decor(
              z_index=1,
              name="house",
              url="decor/grass/house.svg",
              xmas_url="decor/snow/house.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("cfc", "grass"): Decor(
              z_index=1,
              name="cfc",
              # FUTURE: add external branding option
              url="decor/grass/cfc.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree2", "farm"): Decor(
              z_index=4,
              name="tree2",
              url="decor/farm/house2.svg",
              xmas_url="decor/snow/house.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("pond", "farm"): Decor(
              z_index=2,
              name="pond",
              url="decor/farm/crops.svg",
              xmas_url="decor/snow/crops.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile2", "farm"): Decor(
              z_index=0,
              name="tile2",
              url="decor/snow/tile2.svg",
              xmas_url="decor/snow/tile2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 338..345

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

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

          ("tree2", "snow"): Decor(
              z_index=4,
              name="tree2",
              url="decor/snow/tree2.svg",
              xmas_url="decor/snow/tree2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree2", "grass"): Decor(
              z_index=4,
              name="tree2",
              url="decor/grass/tree2.svg",
              xmas_url="decor/snow/tree2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile2", "snow"): Decor(
              z_index=0,
              name="tile2",
              url="decor/snow/tile2.svg",
              xmas_url="decor/snow/tile2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile1", "farm"): Decor(
              z_index=0,
              name="tile1",
              url="decor/farm/tile1.svg",
              xmas_url="decor/snow/tile1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile1", "city"): Decor(
              z_index=0,
              name="tile1",
              url="decor/city/pavementTile.png",
              xmas_url="decor/snow/tile1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("house", "snow"): Decor(
              z_index=1,
              name="house",
              url="decor/snow/house.svg",
              xmas_url="decor/snow/house.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree2", "city"): Decor(
              z_index=4,
              name="tree2",
              url="decor/city/school.svg",
              xmas_url="decor/snow/school.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("cfc", "snow"): Decor(
              z_index=1,
              name="cfc",
              # FUTURE: add external branding option
              url="decor/snow/cfc.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile1", "snow"): Decor(
              z_index=0,
              name="tile1",
              url="decor/snow/tile1.svg",
              xmas_url="decor/snow/tile1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tree1", "city"): Decor(
              z_index=4,
              name="tree1",
              url="decor/city/shop.svg",
              xmas_url="decor/snow/shop.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("bush", "grass"): Decor(
              z_index=3,
              name="bush",
              url="decor/grass/bush.svg",
              xmas_url="decor/snow/bush.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("bush", "farm"): Decor(
              z_index=3,
              name="bush",
              url="decor/farm/bush.svg",
              xmas_url="decor/snow/bush.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile2", "city"): Decor(
              z_index=0,
              name="tile2",
              url="decor/snow/tile2.svg",
              xmas_url="decor/snow/tile2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335

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

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

          ("bush", "snow"): Decor(
              z_index=3,
              name="bush",
              url="decor/snow/bush.svg",
              xmas_url="decor/snow/bush.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("house", "farm"): Decor(
              z_index=1,
              name="house",
              url="decor/farm/house1.svg",
              xmas_url="decor/snow/house1.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("cfc", "city"): Decor(
              z_index=1,
              name="cfc",
              # FUTURE: add external branding option
              url="decor/grass/cfc.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("bush", "city"): Decor(
              z_index=3,
              name="bush",
              url="decor/city/bush.svg",
              xmas_url="decor/snow/bush.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("house", "city"): Decor(
              z_index=1,
              name="house",
              url="decor/city/house.svg",
              xmas_url="decor/snow/house2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 318..325
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

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

          ("tile2", "grass"): Decor(
              z_index=0,
              name="tile2",
              url="decor/snow/tile2.svg",
              xmas_url="decor/snow/tile2.svg",
      Severity: Major
      Found in game/decor.py and 31 other locations - About 30 mins to fix
      game/decor.py on lines 25..32
      game/decor.py on lines 35..42
      game/decor.py on lines 45..52
      game/decor.py on lines 55..62
      game/decor.py on lines 65..73
      game/decor.py on lines 76..83
      game/decor.py on lines 86..93
      game/decor.py on lines 96..103
      game/decor.py on lines 106..113
      game/decor.py on lines 116..123
      game/decor.py on lines 126..134
      game/decor.py on lines 137..144
      game/decor.py on lines 147..154
      game/decor.py on lines 157..164
      game/decor.py on lines 167..174
      game/decor.py on lines 177..184
      game/decor.py on lines 187..194
      game/decor.py on lines 197..204
      game/decor.py on lines 207..214
      game/decor.py on lines 217..224
      game/decor.py on lines 227..234
      game/decor.py on lines 237..244
      game/decor.py on lines 247..254
      game/decor.py on lines 257..264
      game/decor.py on lines 267..274
      game/decor.py on lines 277..284
      game/decor.py on lines 287..294
      game/decor.py on lines 297..304
      game/decor.py on lines 307..315
      game/decor.py on lines 328..335
      game/decor.py on lines 338..345

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

      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

      There are no issues that match your filters.

      Category
      Status