Showing 67 of 67 total issues
Class SudokuAPI
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class SudokuAPI
include Observable
#== Variables d'instances ==
@sudoku
@sudokuCompleted
- Create a ticketCreate a ticket
Method initialize
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize()
SudokuAPI.API.timerPaused = true;
dialog = Gtk::Dialog.new(:parent => Window.window(), :title => "Utilisateurs", :flags => [:modal, :destroy_with_parent], :buttons => [["_OK", :ok]]);
dialog.resizable = false;
dialog.decorated = false;
- Create a ticketCreate a ticket
Class Generator
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class Generator
@grid = [] #avec trou
@gridPlayer = [] #completé par le jouer
@gridCorrect = [] #sans trou
- Create a ticketCreate a ticket
File SudokuAPI.rb
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
class SudokuAPI
include Observable
#== Variables d'instances ==
@sudoku
@sudokuCompleted
- Create a ticketCreate a ticket
Method initialize
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(newGame)
@avatarList = Dir[AssetManager.assetsDir() + "/avatar_big/*.png"];
@avatarIndex = 0;
window = Window.window();
- Create a ticketCreate a ticket
Method initialize
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(parent)
SudokuAPI.API.add_observer(self);
myGenerator = nil
bNewGrid = createButton("grid.png", "Nouvelle partie");
- Create a ticketCreate a ticket
Method render
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def render(squareView, idget, ctx, x, y)
#White background
setColor(ctx, @caze.color);
ctx.rectangle(0, 0, @@size, @@size);
- Read upRead up
- Create a ticketCreate a ticket
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 render
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
def render(squareView, idget, ctx, x, y)
#White background
setColor(ctx, @caze.color);
ctx.rectangle(0, 0, @@size, @@size);
- Create a ticketCreate a ticket
Method initialize
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def initialize(difficulty, grid_string = "")
puts "Generating new sudoku..."
# Either take a pre-created puzzle, or create a new one programmatically
random = Random.new
- Read upRead up
- Create a ticketCreate a ticket
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 solve!
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def solve!
unchanged = false
imin = nil
pmin = []
min = 10
- Read upRead up
- Create a ticketCreate a ticket
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 show
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def OverlayManager.show()
@@open = true;
square = SquareView.selectedSquareView();
caze = SquareView.selectedSquareView().caze;
OverlayManager.clear();
- Read upRead up
- Create a ticketCreate a ticket
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 createEntry
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def createEntry(modConf)
hBox = Gtk::Box.new(:horizontal, 2)
#css
hBox.name = "configEntry"
#css
- Create a ticketCreate a ticket
Method initialize
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def initialize()
SudokuAPI.API.timerPaused = true;
dialog = Gtk::Dialog.new(:parent => Window.window(), :title => "Utilisateurs", :flags => [:modal, :destroy_with_parent], :buttons => [["_OK", :ok]]);
dialog.resizable = false;
dialog.decorated = false;
- Read upRead up
- Create a ticketCreate a ticket
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 dessiner
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dessiner cr
## TODO: Définir une largeur de case et fenêtre par défaut chargé
## à partir d'un fichier de config en variables d'instances
@largeurCase = (25 * toplevel.allocated_width / 600).round
- Create a ticketCreate a ticket
Method initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(overlay)
@@buttons = Array.new();
@@overlayPanel = Gtk::Fixed.new();
sudokuChoiceGrid = Gtk::Grid.new();
sudokuChoiceGrid.name = "overlay-grid";
- Create a ticketCreate a ticket
Method solve!
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def solve!
unchanged = false
imin = nil
pmin = []
min = 10
- Create a ticketCreate a ticket
Method demoMethod
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def demoMethod()
@type = "demoMethod"
case @step
when nil
@step = 0
- Create a ticketCreate a ticket
Method onSudokuMethod
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def onSudokuMethod()
if @cazeonSudokuMethod == nil
@cazeonSudokuMethod = firstCazeValue0()
end
@type = "onSudokuMethod"
- Create a ticketCreate a ticket
Method loadSudoku
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def loadSudoku(fileName)
filePath = "save_files/#{fileName}"
if(File.file?(filePath))
loadFile = File.new(filePath, "r")
- Read upRead up
- Create a ticketCreate a ticket
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 onSudokuMethod
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def onSudokuMethod
if(@step == nil)
statutMethod(true)
- Create a ticketCreate a ticket