Пример #1
0
        /// <summary>
        /// 
        /// </summary>
        public GameArea()
        {
            this.InitializeComponent();

            this.game = new TetrisGame(new TetrisDefinitions());
            this.game.Loop += new EventHandler<EventArgs>(Game_Loop);
            this.game.RowClear += new EventHandler<RowClearedEventArgs>(Game_RowClear);

            this.blockControls = new Dictionary<Block, BlockControl>();

            this.CreateDrawArea();
            this.DrawGameArea();
        }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gameArea"></param>
 /// <param name="x">The x coordinate of the block in the game area</param>
 /// <param name="y">The y coordinate of the block in the game area</param>
 public Block(TetrisGame gameArea, int x, int y)
 {
     this.GameArea = gameArea;
     this.Point = new Point(x, y);
 }