Beispiel #1
0
        public World(Game game)
        {
            if (game == null)
                throw new ArgumentNullException("game");

            this.Game = game;

            this.PlayerTop = new Player();
            this.PlayerBottom = new Player();

            int initPaddle = Width / 2 - PaddleWidth / 2;
            this.PlayerTop.Position = initPaddle;
            this.PlayerBottom.Position = initPaddle;

            ResetBall();
        }
Beispiel #2
0
 private void resetButton_Click(object sender, EventArgs e)
 {
     Game = new Game(Kugelmatik);
     this.Focus();
 }