public SnakeWindowsFormClient() { InitializeComponent(); engino = new Engine() { Height = (int)nudHeight.Value, Width = (int)nudWidth.Value }; engino.OnGameOver += Engino_OnGameOver; engino.OnSnakeEatApple += Engino_OnSnakeEatApple; engino.SetupNewGame(); timer = new Timer(); timer.Tick += T_Tick; timer.Interval = 1000; updateTheCalculater(); btnStart_Click(btnStart, null); btnStart_Click(btnStart, null); btnStart_Click(btnStart, null); }
private void btnNewGame_Click(object sender, EventArgs e) { engino.SetupNewGame(); getGameStatus(); }