Теми рефератів
> Реферати > Курсові роботи > Звіти з практики > Курсові проекти > Питання та відповіді > Ессе > Доклади > Учбові матеріали > Контрольні роботи > Методички > Лекції > Твори > Підручники > Статті Контакти
Реферати, твори, дипломи, практика » Курсовые обзорные » Гра "Змійка"

Реферат Гра "Змійка"





cur.point.X && snake.First.Value.point.Y == cur.point.Y) {TheEnd (e);} + +;

} (snake.First.Value.point.X == 640 | snake.First.Value.point.Y == 480 | snake.First.Value.point.Y == 0 | snake . First.Value.point.X == 0) {TheEnd (e);}

(snake.First.Value.point.X == apple.Coordinates.X && snake.First.Value.point.Y == apple.Coordinates.Y)// Collision apple

{(count_apple% 5 == 0) {apple = new Apple (true, snake); m = true;} {apple = new Apple (false, snake); m = false;} _apple + + ; + = (point * bonus);. AddLast (snake.Last.Value); (points> = 1000) {Triumph (e);}

}

}

t_Tick (object sender, EventArgs e)// Move Snake

{. AddFirst (new Dir (snake.First.Value.point.X + dir.point.X, snake.First.Value.point.Y + dir.point.Y));. RemoveLast ();. Refresh ();

}

TheEnd (PaintEventArgs e)

{drawString = "The End"; drawFont = new Font ("Arial", 15); drawBrush = new SolidBrush (Color.Red); drawPoint = new PointF (270, 10); . Graphics.DrawString (drawString, drawFont, drawBrush, drawPoint);. Dispose ();. Points = points;. Add (person);. Graphics.DrawString ("Ваш результат:", drawFont, new SolidBrush (Color. Green), new PointF (200, 30));. Graphics.DrawString (person.Player + ":" + Convert.ToString (person.Points), drawFont, new SolidBrush (Color.Green), new PointF (200 , 50));. Graphics.DrawString ("Рекорди", new Font ("Arial", 15), new SolidBrush (Color.Black), new PointF (250, 70)); temp = table . GetAllPersons (); w = 90; = new Font ("Tahoma", 15); = new SolidBrush (Color.Orange); n = temp.Count; (n> 10) {n = 10;} (int i = 0; i

{. Graphics.DrawString (temp [i]. Player + ":" + Convert.ToString (temp [i]. Points), drawFont, drawBrush, new PointF (200, w) ); + = 20;

}. Close ();

}

Triumph (PaintEventArgs e)

{. Dispose (); drawString = "Перемога"; drawFont = new Font ("Arial", 100); drawBrush = new SolidBrush (Color.Red); drawPoint = new PointF (100 , 10);. Graphics.DrawString (drawString, drawFont, drawBrush, drawPoint); = new Font ("Arial", 15);. Stop ();. Points = points;. Add (person);. Graphics.DrawString ("Ваш результат:", drawFont, new SolidBrush (Color.Green), new PointF (200, 130));. Graphics.DrawString (person.Player + ":" + Convert.ToString (person.Points ), drawFont, new SolidBrush (Color.Green), new PointF (200, 150));. Graphics.DrawString ("Рекорди", new Font ("Arial", 15), new SolidBrush (Color.Black), new PointF (250, 170)); temp = table.GetAllPersons ();. OrderByDescending (y => y.Points); w = 190; = new Font ("Tahoma", 15); = new SolidBrush (Color.Orange); n = temp.Count; (n> 10) {n = 10;} (int i = 0; i

{. Graphics...


Назад | сторінка 7 з 9 | Наступна сторінка





Схожі реферати:

  • Реферат на тему: Особливості роботи з Power Point
  • Реферат на тему: Діяльність рекламного агентства GLOBAL POINT AGENCY
  • Реферат на тему: Використання програми Power Point для створення рекламних роликів
  • Реферат на тему: ! Застосування програмного продукту Power Point у процесі автоматізації роб ...
  • Реферат на тему: Apple's analysis