Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public PeekableTetrominoGenerator(ITetrominoGenerator baseGenerator)
 {
     this.baseGenerator = baseGenerator;
     next = baseGenerator.Next();
 }