Update 2024-03-27: Greatly expanded the "Samples" page and renamed it to "Glossary".
Update 2024-04-04: Added 5 million mid-2011 posts from the k47 post dump. Browse (mostly) them here.
Update 2024-04-07: Added ~400 October 2003 posts from 4chan.net. Browse them here.

Welcome to Oldfriend Archive, the official 4chan archive of the NSA. Hosting ~170M text-only 2003-2014 4chan posts (mostly 2006-2008).
[4 / 0 / ?]

[1385533584] Flow on C#

No.153465 View ViewReplyOriginalReport
I need to do this game called Flow, this has to connect two separates point with one line, but the other lines can't touch the other ones. So, I'm using the MouseMove propertie but I need help with the intersections so the program can tell with a messagebox some kind of "error" o continue with the game

        List<Point> lista = new List<Point>();

              Main ()

           private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            Graphics g = this.CreateGraphics();
            Pen lapiz = new Pen(Color.Purple, 8);
            g.DrawRectangle(lapiz, new Rectangle(e.X, e.Y, 3, 3));

            lista.Add(new Point(e.X, e.Y));
            if (lista.Count > 1)
            {
                g.DrawLine(lapiz, lista[lista.Count - 1], lista[lista.Count - 2]);
            }

           
        }