Function draw
has 50 lines of code (exceeds 25 allowed). Consider refactoring.
draw: function(x, y) {
ctx.fillStyle = "black";
ctx.fillRect(x, y, 76, -40);
ctx.beginPath();
Function draw
has 47 lines of code (exceeds 25 allowed). Consider refactoring.
draw: function() {
ctx.beginPath();
Function draw
has 32 lines of code (exceeds 25 allowed). Consider refactoring.
draw: function(x, y) {
let numberSpikes = 20;
let sawRadius = 80;
let sawHeight = y - 60 * (3 + Math.sin(time / 70 / 2 * Math.PI));
Function draw
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
draw: function(x, y) {
ctx.fillStyle = "black";
ctx.fillRect(x, y, 76, -40);
ctx.beginPath();
Function drawObstacles
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
let drawObstacles = function() {
let obs_listPosition = 0;
* which we shift the obstacles to the left. */
Function drawStats
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
let drawStats = function() {
ctx.fillStyle = "white";
ctx.font = '20px monospace';
ctx.fillText("time = " + time, 10, 20);
ctx.fillText("hero position = [" + hero.x.toFixed(0) +
Function drawHero
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
let drawHero = function() {
if (debugMode) {
hero.x = mousePosition.x;
hero.y = mousePosition.y;
} else {