Queue¶
- class tetris_gymnasium.components.tetromino_queue.TetrominoQueue(randomizer: Randomizer, size=4)[source]¶
The TetrominoQueue stores all incoming tetrominoes in a queue.
The sequence of pieces is generated by a
Randomizer
, which can be customized by the user.- Parameters:
randomizer – The randomizer that generates the tetrominoes sequence.
size – The number of tetrominoes to store. Defaults to 4.
Methods¶
- TetrominoQueue.reset(seed=None)[source]¶
Reset the queue to its initial state.
- Parameters:
seed – The seed to use for the randomizer. Defaults to None.