public Game(int fieldWidth, int fieldHeight, ITetrominoGenerator tetrominoGenerator) { if (fieldWidth % 2 != 0) { throw new ArgumentException("fieldWidth must be even."); } this.tetrominoGenerator = tetrominoGenerator; Field = new Field(fieldWidth, fieldHeight); activePiece = NewPiece(); }
public PeekableTetrominoGenerator(ITetrominoGenerator baseGenerator) { this.baseGenerator = baseGenerator; next = baseGenerator.Next(); }