using System.Collections.Generic;
static void Main(string[] args)
Random rnd = new Random();
int w = Polygon.GetClientWidth();
int h = Polygon.GetClientHeight();
Point yBottom = new Point(0, -h / 2);
Point yTop = new Point(0, h / 2);
Polygon yAxis = new Polygon(yBottom, yTop);
Point xLeft = new Point(-w / 2, 0);
Point xRight = new Point(w / 2, 0);
Polygon xAxis = new Polygon(xLeft, xRight);
Console.WriteLine("m={0},b={1}", m, b);
Point A = new Point(-w / 2, m * -50 + b);
Point B = new Point(w / 2, m * 50 + b);
Polygon t = new Polygon(A, B);
Polygon pA = new Polygon(20, 3);
pA.Move(A.GetX(), A.GetY());
Polygon pB = new Polygon(20, 3);
pB.Move(B.GetX(), B.GetY());
Polygon lineCaption = new Polygon(10, 0);
lineCaption.SetCaption("Y=" + m + "X+" + b);
lineCaption.Move(-w / 2 + 100, h / 2 - 100);
int m_ani = rnd.Next(1, 11);
int b_ani = rnd.Next(1, 11);
int x_ani = rnd.Next(51);
int y_ani = x_ani * m_ani + b_ani;
Console.WriteLine("m={0},b={1}", m_ani, b_ani);
Point A_ani = new Point(-w / 2, m_ani * -w / 2 + b_ani);
Point B_ani = new Point(w / 2, m_ani * w / 2 + b_ani);
Point M = new Point(x_ani, y_ani);
Polygon t_ani = new Polygon(A_ani, B_ani);
Polygon pA_ani = new Polygon(20, 3);
pA_ani.SetCaption("A" + A_ani);
pA_ani.Move(A_ani.GetX(), A_ani.GetY());
Polygon pB_ani = new Polygon(20, 3);
pB_ani.SetCaption("B" + B_ani);
pB_ani.Move(B_ani.GetX(), B_ani.GetY());
Polygon lineCaption_ani = new Polygon(10, 0);
lineCaption_ani.SetCaption("Y=" + m_ani + "X+" + b_ani);
lineCaption_ani.Move(-w / 2 + 100, h / 2 - 100);
Polygon pM = new Polygon(20, 3);
int m_5 = rnd.Next(1, 11);
int b_5 = rnd.Next(1, 11);
Console.WriteLine("m={0},b={1}", m_5, b_5);
Point A_5 = new Point(-w / 2, m_5 * -w / 2 + b_5);
Point B_5 = new Point(w / 2, m_5 * w / 2 + b_5);
Polygon t_5 = new Polygon(A_5, B_5);
Polygon pA_5 = new Polygon(20, 3);
pA_5.SetCaption("A" + A_5);
pA_5.Move(A_5.GetX(), A_5.GetY());
Polygon pB_5 = new Polygon(20, 3);
pB_5.SetCaption("B" + B_5);
pB_5.Move(B_5.GetX(), B_5.GetY());
Polygon lineCaption_5 = new Polygon(10, 0);
lineCaption_5.SetCaption("Y=" + m_5 + "X+" + b_5);
lineCaption_5.Move(-w / 2 + 100, h / 2 - 100);
int y_5 = m_5 * x_5 + b_5;
Polygon pM_5 = new Polygon(20, 3);
Console.WriteLine("The X of the placed point is " + x_5);
Console.WriteLine("Please enter the Y of the placed point:");
ans = int.Parse(Console.ReadLine());
Console.WriteLine("less");
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
Console.WriteLine("more");
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Red);
pM_5.SetBrushColor(System.Drawing.Color.White);
pM_5.SetBrushColor(System.Drawing.Color.Green);
Console.WriteLine("VERY GOOD");