void GameTick(object sender, EventArgs e) { int s, l, n; s = myBoard.getScore(); l = myBoard.getLevel(); n = 410 - (l * 30); Timer.Interval = new TimeSpan(0, 0, 0, 0, n); Score.Content = "Score=" + myBoard.getScore().ToString("0000"); Lines.Content = "Level=" + myBoard.getLevel().ToString("0000"); myBoard.CurrTetriminoMoveDown(); if (myBoard.getGameEnd()) { GameEnd main = new GameEnd(s, l); App.Current.MainWindow = main; this.Close(); main.Show(); Timer.Stop(); } }