Please give this p5.js code a switch. If the switch is turned on, then one point can be erased from a cell if the cell is touched/clicked: const columns = 6;
const rows = 7;
const cellSize = 50;
const offsetX = cellSize;
const offsetY = cellSize;
const points = [];
const romanNumerals = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X",
"XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX",
"XXI", "XXII", "XXIII", "XXIV", "XXV", "XXVI", "XXVII", "XXVIII", "XXIX", "XXX",
"XXXI", "XXXII", "XXXIII", "XXXIV", "XXXV", "XXXVI", "XXXVII", "XXXVIII", "XXXIX", "XL",
"XLI", "XLII", "XLIII", "XLIV", "XLV", "XLVI", "XLVII", "XLVIII", "XLIX", "L"];
const selectedCells = [];

function setup() {
createCanvas(columns * cellSize + offsetX, rows * cellSize + offsetY);
  

for (let i = 0; i < columns * rows; i++) {
points.push(0);
}

const button = createButton(' 🤖 Random 🤖');
button.position(370, 525);
button.mousePressed(selectRandomPosition);
}

function draw() {
background(255);
textAlign(CENTER, CENTER);
  drawSelectedCells();
drawGrid();
 
drawHeaderRow();
drawHeaderColumn();
}

function drawHeaderRow() {
for (let x = 0; x < columns; x++) {
fill(0);
text(columns - x, x * cellSize + offsetX + cellSize / 2, cellSize / 2);
}
}

function drawHeaderColumn() {
for (let y = 0; y < rows; y++) {
fill(0);
text(y + 1, cellSize / 2, y * cellSize + offsetY + cellSize / 2);
}
}

function drawGrid() {
for (let x = 0; x < columns; x++) {
for (let y = 0; y < rows; y++) {
const index = x * rows + y;
const px = x * cellSize + offsetX;
const py = y * cellSize + offsetY;
stroke(0);
noFill();
rect(px, py, cellSize, cellSize);

fill(25, 255, 255);
if (points[index] > 0) {
text(romanNumerals[points[index] - 1], px + cellSize / 2, py + cellSize / 2);
}
}
}
}

function drawSelectedCells() {
for (const cell of selectedCells) {
let x1 = cell.col * cellSize + offsetX;
let y1 = cell.row * cellSize + offsetY;
fill(255, 0, 0);
noStroke();
rect(x1, y1, cellSize, cellSize);
}
}

function mouseClicked() {
const x = floor((mouseX - offsetX) / cellSize);
const y = floor((mouseY - offsetY) / cellSize);
const index = x * rows + y;

if (index < points.length && x < columns && y < rows) {
points[index]++;
}
}

function selectRandomPosition() {
    if (selectedCells.length >= columns * rows) {
        alert("All cells have been selected.");
        return;
    }

    // Play sound and call setTimeout for handleClick after 2 seconds
    playRandomRobotSound();
    setTimeout(handleClick, 2000);
}

function handleClick() {
    let col, row;
    do {
        col = floor(random(columns));
        row = floor(random(rows));
    } while (isSelected(col, row));

    selectedCells.push({ col, row });
}
function playRandomRobotSound() {
    const context = new AudioContext();

    const numNotes = 12;
    const duration = 1.5;
    const interval = duration / numNotes;

    for (let i = 0; i < numNotes; i++) {
        const oscillator = context.createOscillator();
        const gainNode = context.createGain();
        oscillator.connect(gainNode);
        gainNode.connect(context.destination);

        const frequency = Math.random() * 500 + 200;
        oscillator.frequency.setValueAtTime(frequency, context.currentTime);

        const startTime = context.currentTime + (interval * i);
        const endTime = startTime + interval;

        gainNode.gain.setValueAtTime(1, startTime);
        gainNode.gain.exponentialRampToValueAtTime(0.001, endTime);

        oscillator.start(startTime);
        oscillator.stop(endTime);
    }
}



function isSelected(col, row) {
return selectedCells.some(cell => cell.col === col && cell.row === row);
}