[4 / 0 / ?]
Quoted By:
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]);
}
}
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]);
}
}