video-game-coding-club/geometry-smash

View on GitHub

Showing 7 of 53 total issues

Function draw has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

draw: function(x, y) {
ctx.fillStyle = "black";
ctx.fillRect(x, y, 76, -40);
 
ctx.beginPath();
Severity: Minor
Found in main.js - About 2 hrs to fix

    Function draw has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    draw: function() {
     
    /* body and color */
     
    ctx.beginPath();
    Severity: Minor
    Found in main.js - About 1 hr to fix

      Function draw has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      draw: function(x, y) {
      let numberSpikes = 20;
      let sawRadius = 80;
      let sawHeight = y - 60 * (3 + Math.sin(time / 70 / 2 * Math.PI));
       
       
      Severity: Minor
      Found in main.js - About 1 hr to fix

        Function draw has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        draw: function(x, y) {
        ctx.fillStyle = "black";
        ctx.fillRect(x, y, 76, -40);
         
        ctx.beginPath();
        Severity: Minor
        Found in main.js - About 1 hr to fix

        Function drawObstacles has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        let drawObstacles = function() {
        let obs_listPosition = 0;
         
        /* Calculate the offset of the obstacles. This is the amount by
        * which we shift the obstacles to the left. */
        Severity: Minor
        Found in main.js - About 1 hr to fix

        Function drawStats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        let drawStats = function() {
        ctx.fillStyle = "white";
        ctx.font = '20px monospace';
        ctx.fillText("time = " + time, 10, 20);
        ctx.fillText("hero position = [" + hero.x.toFixed(0) +
        Severity: Minor
        Found in main.js - About 35 mins to fix

        Function drawHero has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        let drawHero = function() {
        if (debugMode) {
        hero.x = mousePosition.x;
        hero.y = mousePosition.y;
        } else {
        Severity: Minor
        Found in main.js - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language