JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<head>

	<title> The Eye of Cyclops </title>
<script>
    var
    cObj,
    cContext,
    imgObj,
    rectPO,
    svgPO,
    sampleCount;

    var 
    successBin = [],
    goArr      = [],
    dotArr     = [],
    zipLineArr = [],
    a          = 0;

    var
    xStart0,
    yStart0,
    x0Dir, 
    y0Dir,
    xStart1,
    yStart1,
    x1Dir,
    y1Dir,
    x0Offset,
    y0Offset,
    uShipXPos,
    uShipYPos;

    var
    redrawCon;
    
    var
    mouseXStart, 
    mouseYStart,
    mouseXEnd,
    mouseYEnd,
    mouseYR,
    mouseXR,
    mouseTR,
    opcode;

    /* ================================================
    * Color code arr
    * ================================================= */
 


	// -- gui
    var 
    scoreDOM,
    pScore,
    zLDOM,
    zLNum;

    // -- status flags
    var 
    canonMF,
    newLF,
    newLFCyclops,
    currCount,
    timeLim,
    motionCurrCount,
    motionTimeLim,
    motionStateCS,
    motionXOffset,
    motionYOffset,
    motionXDir,
    motionYDir;

    var
    currRoundCount, 
    roundLimit,
    newDropRoundFlag,
    spiderActiveFlag;

    // -- 
    var 
    cyclopsDirArr            = [ 0, 0 ], // -- top/down = 1/-1. left/right = -1/1
    cyclopsMoveXIndex        = 0,
    cyclopsMoveYIndex        = 1;


    // -- image
    var
    img;

    // -- 
    var 
    playerArr         = [];

    // -- player score
    var 
    playerScore,
    laserLim,
    playerHealth;


      // -- QA array
      var
      allQAArr,
      onscreenList,
      answerList,
      chosenQAObj,
      indexObjArr,
      chosenPos,
      newSetFlag,
      cQALim;               // -- circle, qa limit loop controll var

        costumeArr   = [ "../images/blue_fish.png", "../images/red_fish.png", "../images/green_fish.png", "../images/soccer_ball.png" ];



      var
      clipX = 000,      // -- offset of the cropped image to the real image
      clipY = 00,
      clipW = 1000,
      clipH = 500,
      imgX  = 0,      //...