Ousret/Picross-L3S6

View on GitHub

Showing 34 of 2,952 total issues

File main.rb has 328 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'observer'
require 'json'
require 'curb'

load './class/bmp.class.rb'
Severity: Minor
Found in main.rb - About 3 hrs to fix

    Method actionOnGame has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

      def actionOnGame(unTypeEvenement, unComposantCible, unTexteEntree=nil)
        # Gestion des événements sur menu principal
        return if unTypeEvenement != 1 # On ne recherche que le clique souris
        btn_cible_libell = unComposantCible.designation
    
    
    Severity: Minor
    Found in main.rb - About 3 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method initializeGame has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def initializeGame
        @kInGame.supprimeTout
    
        background = Image.creer("Background", "ressources/maps/Couloirs-Resized.png", 0, 0, 0)
    
    
    Severity: Major
    Found in main.rb - About 2 hrs to fix

      Class Jeu has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class Jeu
      
        FAST_GAME = "Partie rapide"
        ADVENTURE = "Aventure"
        QUIT = "Quitter"
      Severity: Minor
      Found in main.rb - About 2 hrs to fix

        Method actionOnGame has 53 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def actionOnGame(unTypeEvenement, unComposantCible, unTexteEntree=nil)
            # Gestion des événements sur menu principal
            return if unTypeEvenement != 1 # On ne recherche que le clique souris
            btn_cible_libell = unComposantCible.designation
        
        
        Severity: Major
        Found in main.rb - About 2 hrs to fix

          Method setAnimations has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
          Open

              def setAnimations
                #Boucle de rafraichissement
                always do
                  @@contexte.listeComposant.each do |composant|
          
          
          Severity: Minor
          Found in class/render.class.rb - About 1 hr 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

          Method setup has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def setup
          
                @scene_loops_per_second = 24
                @@vertex = nil
          
          
          Severity: Minor
          Found in class/render.class.rb - About 1 hr to fix

            Method initialize has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def initialize(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
            Severity: Major
            Found in class/sprite.class.rb - About 1 hr to fix

              Method creer has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def Sprite.creer(uneDesignation, uneImage, uneDimX, uneDimY, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
              Severity: Major
              Found in class/sprite.class.rb - About 1 hr to fix

                Method read_dib_header has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                        def read_dib_header(file)
                        #méthode qui effectue des tests pour les exceptions :
                        #test si l'url est bonne
                        #test si l'image est convenable :
                        #    l'image doit être codée avec du 24bit par pixel
                Severity: Minor
                Found in class/bmp.class.rb - About 1 hr 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

                Method initialize has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def initialize(uneDesignation, unCheminRelatif, lectureInfinie, uneAttenuation, uneFrequencePitch, unePositionX, unePositionY, unePositionZ) # :nodoc:
                Severity: Major
                Found in class/audio.class.rb - About 1 hr to fix

                  Method creer has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def Audio.creer(uneDesignation, unCheminRelatif, lectureInfinie, uneAttenuation, uneFrequencePitch, unePositionX, unePositionY, unePositionZ)
                  Severity: Major
                  Found in class/audio.class.rb - About 1 hr to fix

                    Method setup has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def setup
                    
                          @scene_loops_per_second = 24
                          @@vertex = nil
                    
                    
                    Severity: Minor
                    Found in class/render.class.rb - About 55 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

                    Method calculeIndiceCote has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def calculeIndiceCote()
                    
                            nbCaseNoirConsecutif = 0 #variable qui permet de gerer les cases noir consecutifs
                            x=0
                            while x < @matriceComparaison.length #--------------------------------------on parcours chaque ligne
                    Severity: Minor
                    Found in class/grille.class.rb - About 55 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

                    Method calculeIndiceHaut has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def calculeIndiceHaut()
                    
                            nbCaseNoirConsecutif = 0 #variable qui permet de gerer les cases noir consecutifs
                            y=0
                            while y < @matriceComparaison.length #------------------------------------on parcours chaque colonne
                    Severity: Minor
                    Found in class/grille.class.rb - About 55 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

                    Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
                    Severity: Minor
                    Found in class/objetgui.class.rb - About 45 mins to fix

                      Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def initialize(uneDesignation, unContenu, uneTaillePolice, unePositionX, unePositionY, unePositionZ) # :nodoc:
                      Severity: Minor
                      Found in class/text.class.rb - About 45 mins to fix

                        Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
                        Severity: Minor
                        Found in class/popup.class.rb - About 45 mins to fix

                          Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def initialize(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY) # :nodoc:
                          Severity: Minor
                          Found in class/fenetre.class.rb - About 45 mins to fix

                            Method creer has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def PopUp.creer(uneDesignation, unePositionX, unePositionY, unePositionZ, uneTailleX, uneTailleY)
                            Severity: Minor
                            Found in class/popup.class.rb - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language