Paper.io.gitlab Upd Info

// draw active trail (semi-transparent yellow/white) for(let i=0; i<player.trail.length; i++) const seg = player.trail[i]; ctx.fillStyle = `rgba(255, 235, 140, $0.5 + (i/player.trail.length)*0.3)`; ctx.fillRect(seg.x*CELL_SIZE, seg.y*CELL_SIZE, CELL_SIZE-0.8, CELL_SIZE-0.8);

// add new cell to territory (and optionally remove trail) function addCellToTerritory(cx, cy) let key = getKey(cx,cy); if(!player.cells.has(key)) player.cells.add(key); grid[cx][cy] = 1; paper.io.gitlab