Pandora’s Blocks wrapper¶
- class pyboy.plugins.game_wrapper_pandoras_blocks.GameWrapperPandorasBlocks(*args, **kwargs)[source]¶
Bases:
PyBoyGameWrapperThis class wraps Pandora’s Blocks and provides easy access to score, lines and level for AIs.
Pandora’s Blocks uses its level as the number of lines cleared, so
linesandlevelhave the same value. If you callprinton an instance of this object, it will show an overview of everything this object provides.- mapping_compressed¶
Compressed mapping for
pyboy.PyBoy.game_area_mapping
- mapping_minimal¶
Minimal mapping for
pyboy.PyBoy.game_area_mapping
- score¶
The score provided by the game
- level¶
The current level
- lines¶
The number of cleared lines
- start_game(timer_div=None)[source]¶
Call this function right after initializing PyBoy. This navigates through the intro and menu to start the game at the first playable state.
The title-screen state is saved, and using
reset_game, you can get back to this point instantly.- Parameters:
timer_div (int) – Replace timer’s DIV register with this value.
- reset_game(timer_div=None)[source]¶
After calling
start_game, you can call this method at any time to reset the game.- Parameters:
timer_div (int) – Replace timer’s DIV register with this value.
- game_area()[source]¶
Return the 10 by 18 playfield as a matrix of tile identifiers.
The score, lines cleared, and level are available as attributes of this class.