/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (TanksGame game = new TanksGame()) { game.Run(); } }
public Form1() { InitializeComponent(); SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); Timer GameTimer = new Timer(); GameTimer.Interval = 33; GameTimer.Tick += GameTimer_Tick; GameTimer.Start(); Paint += Form1_Paint; KeyDown += Form1_KeyDown; _tanksGame = new TanksGame(new GameObjectDrawer(new Dimension(ClientSize.Width, ClientSize.Height))); _tanksGame.Initialize(); }