示例#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
文件: Block.cs 项目: brunodfg/Tetris
 /// <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);
 }