static void Main() { Snake snake; Food food; Enviroment enviroment; snake = new Snake(); food = new Food(); enviroment = new Enviroment(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }
public Form1() { InitializeComponent(); snake = new Snake(); food = new Food(); gamecontrol = new GameControl(); enviroment = new Enviroment(); food.CreateFood(); // hogy a legelején legyen kaja // dupla bufferelés SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); UpdateStyles(); }