Ejemplo n.º 1
0
        /// <summary>
        /// インスタンスを生成します。
        /// </summary>
        public Game()
        {
            this.Field.PlacedBlocks.Subscribe(_ =>
            {
                //--- 10 行消すたびにスピードアップ
                var count = this.Result.TotalRowCount.Value / 10;
                if (count > this.PreviousCount)
                {
                    this.PreviousCount = count;
                    this.Field.SpeedUp();
                }

                //--- 新しいテトリミノを設定
                var kind = this.nextTetrimino.Value;
                this.nextTetrimino.Value   = Tetrimino.RandomKind();
                this.Field.Tetrimino.Value = Tetrimino.Create(kind);
            });
            this.Field.LastRemovedRowCount.Subscribe(this.Result.AddRowCount);
        }