Fix game over restart logic and update README

This commit is contained in:
2026-06-23 00:09:42 +02:00
parent e07e8c6e56
commit c0c217f4f6
25 changed files with 1355 additions and 47 deletions
+18
View File
@@ -0,0 +1,18 @@
from pyboy import PyBoy
import sys
def take_screenshot():
# Initialize PyBoy in headless mode to not block or require X11
pyboy = PyBoy('hello_iso.gb', window_type="headless")
# Run for 300 frames to let the PyBoy boot screen finish and the title screen render fully
for _ in range(300):
pyboy.tick()
# Take screenshot
pyboy.screen.image.save('screenshot.png')
print("Screenshot saved to screenshot.png")
pyboy.stop()
if __name__ == "__main__":
take_screenshot()