         ctx.lineTo(x, y);
                }
            }
            
            ctx.closePath();
            ctx.strokeStyle = hexagon.color;
            ctx.lineWidth = 4;
            ctx.stroke();
            
            ctx.restore();
        }
        
        // Draw ball
        function drawBall() {
            ctx.beginPath();
            ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
            ctx.fillStyle = ball.color;
            
            // Add gradient for 3D effect
         