public void Draw() { Bitmap flag = new Bitmap(fieldSize, fieldSize); Graphics flagGraphics = Graphics.FromImage(flag); BallView.DrawBall(BallModel.GetBall(), flagGraphics); BlocksView.DrawBlocks(BlockModel.GetBlocks(), flagGraphics); TankView.DrawTanks(TankModel.GetTanks(), flagGraphics); AppleView.DrawApples(AppleModel.GetApples(), flagGraphics); pictureBox.Image = flag; }
public void Draw() { Bitmap flag = new Bitmap(gameField.Size, gameField.Size); Graphics flagGraphics = Graphics.FromImage(flag); BlocksView.DrawBlocks(blockController.GetBlocks(), flagGraphics); BallView.DrawBall(ballController.GetBall(), flagGraphics, imageController.GetImages()); TankView.DrawTanks(tankController.GetTanks(), flagGraphics, imageController.GetImages()); AppleView.DrawApples(appleController.GetApples(), flagGraphics); pictureBox.Image = flag; }