private void Form1_Paint(object sender, PaintEventArgs e) { food.drawfood(paper); paper = e.Graphics; Snake.snakedraw(paper); for (int i = 0; i < Snake.snakerec.Length; i++) { if (Snake.snakerec[i].IntersectsWith(food.foodrec)) { food.fooloc(randfood); } } }
int score = 0; //score private void Form1_Paint(object sender, PaintEventArgs e) { paper = e.Graphics; food.drawfood(paper); snakes.drawSnake(paper); }