public void newGame() { seconds = 60; points = 0; generator = new ObstacleGenerator(); textBox1.Text = points.ToString(); generator.addObstacles(pictureBox1.Size, numberOfObstacles); foodL = new FoodList(); foodL.fillDictionary(pictureBox1.Size, generator.obstacleList); progressBar1.Value = 0; progressBar1.Maximum = foodL.foodByPlace.Count; pacman = new Pacman(Food.representation.Width / 2, Food.representation.Height / 2, Food.representation.Width / 2); pictureBox1.Invalidate(); }
public FoodList() { generator = new ObstacleGenerator(); foodByPlace = new Dictionary <Point, Food>(); }