Show the choice: the selected square gets a see-through yellow layer. same(a, b) says whether two squares are the
same; arrays cannot be compared with ===.
```js
const same = (a, b) => a && b && a[0] === b[0] && a[1] === b[1]
ctx.fillRect(x, y, SQ, SQ)
if (same(selected, [r, c])) {
ctx.fillStyle = 'rgba(250, 204, 21, 0.45)'
ctx.fillRect(x, y, SQ, SQ)
}
```
What it means
same compares the row and the column. a && b first makes sure neither is null.
rgba(250, 204, 21, 0.45) is yellow with 45% opacity, painted over the square so its color shows through.
Your turn
Above function clickSquare write same.
In draw, under ctx.fillRect(x, y, SQ, SQ) write the if block (above const piece = ...).