public bool HitsRacket(Racket racket) { return(_bounds.Bottom >= racket.Area.Top && _bounds.Bottom <= racket.Area.Bottom && _bounds.Left >= racket.Area.Left && _bounds.Right <= racket.Area.Right); }
private void ResetGame() { _random = new Random(); Cursor.Hide(); _playground = new Playground(this); _playground.FullScreen(); _ball = new Ball { X = 4, Y = 4 }; _racket = new Racket(racket, Bottom); _score = new Score(points); _gameover = new Gameover(gameover); _gameover.Hide(); _gameover.Center(_playground); timer1.Enabled = true; }
public bool MissesRacket(Racket racket) { return(_bounds.Bottom >= racket.Area.Bottom); }