Last active
December 17, 2018 21:10
-
-
Save jasonrm/b4a2e4f60face8af25ccb05d17948cf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from time import sleep | |
import bizhawk.emu as emu | |
import bizhawk.gui as gui | |
from System.Drawing import Pen, Color | |
pen = Pen(Color.FromArgb(255, 255, 0, 0)) | |
def update(): | |
with gui.GraphicsContext() as g: | |
offset = random.randint(1,101) | |
size = random.randint(1,101) | |
g.DrawRectangle(pen, offset, offset + size, offset, offset + size) | |
while True: | |
update() | |
emu.frame_advance() | |
sleep(0.2) | |
emu.frame_advance() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment