示例#1
0
 public TetrisBoardLogic(TetrisEngineSettings settings)
 {
     Logger            = settings.Logger;
     Rows              = settings.Rows;
     Columns           = settings.Columns;
     FixedBricksLogic  = new TetrisFixedBricksLogic(Rows, Columns, settings.RowsWithFixedBricks);
     CollisionDetector = new TetrisCollisionDetector(FixedBricksLogic, Rows, Columns);
     MakeNewPiece();
 }
示例#2
0
        private static void RunTetris()
        {
            TetrisEngineSettings settings = new TetrisEngineSettings
            {
                Columns             = 16,
                Logger              = new DebugLogger(),
                Rows                = 15,
                Speed               = 4,
                RowsWithFixedBricks = 0,
                EnableTimer         = true
            };

            TetrisEngine    tetrisEngine = new TetrisEngine(settings);
            TetrisConsoleUI tetrisUI     = new TetrisConsoleUI(tetrisEngine, GameMode.Interactive);

            tetrisUI.Start();
        }
示例#3
0
 public TetrisEngine(TetrisEngineSettings settings)
 {
     Settings = settings;
     Initialize();
 }