private void CheckWin() { if (Settings.BlocksCount * 100 == _gamer.Score) { _timer.Stop(); var endWindow = new EndWindow(this, _gamer, true); endWindow.Show(); } }
private void CheckLoss() { if (_field.Ball.Position.Y > PlayField.ActualHeight) { _timer.Stop(); _isGame = false; _gamer.LifeCount--; _field.Ball.Move(); SetProperties(); WindowChangeHandler(null, null); UpdateCanvas(); if (_gamer.LifeCount == 0) { _timer.Stop(); var endWindow = new EndWindow(this, _gamer, false); endWindow.Show(); } } }