function getColor(num){ num = parseInt(num); if(num === 0) return "lime"; const vermelhos = [1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36]; return vermelhos.includes(num) ? "red" : "white"; } function checkHighLowSequence(guielement, roletaIndex, numsArray){ const seqLength = 5; let highCount = 0, lowCount = 0; numsArray.forEach(n=>{ if(n>=16 && n<=32){highCount++; lowCount=0;} else if(n>=0 && n<=15){lowCount++; highCount=0;} else{highCount=0; lowCount=0;} }); if(highCount>=seqLength){ /* criar notificação verde */ } if(lowCount>=seqLength){ /* criar notificação laranja */ } }