Exemple #1
0
 //starts a new game
 private void newGame()
 {
     score = 0;
     Random r = new Random();
     fruit = new GamePoint(r.Next(60), r.Next(40));
     g.Clear(Color.White);
     g.FillRectangle(new SolidBrush(Color.Black), fruit.toRectangle());
     s = new Snake();
     s.draw(g);
     timer1.Start();
 }