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(); }
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(); }
public TetrisEngine(TetrisEngineSettings settings) { Settings = settings; Initialize(); }