MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / handleCellMouseOver

Function handleCellMouseOver

assets/js/ConnectFour.js:390–403  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

388};
389
390const handleCellMouseOver = (e) => {
391 if (!gameIsLive) return;
392
393 const cell = e.target;
394 const [rowIndex, colIndex] = getCellLocation(cell);
395
396 const topCell = topCells[colIndex];
397
398 if (greenIsNext) {
399 topCell.classList.add("green");
400 } else {
401 topCell.classList.add("red");
402 }
403};
404
405const handleCellMouseOut = (e) => {
406 const cell = e.target;

Callers

nothing calls this directly

Calls 1

getCellLocationFunction · 0.85

Tested by

no test coverage detected