Skip to content

Instantly share code, notes, and snippets.

@jasonrm
Last active December 17, 2018 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonrm/b4a2e4f60face8af25ccb05d17948cf0 to your computer and use it in GitHub Desktop.
Save jasonrm/b4a2e4f60face8af25ccb05d17948cf0 to your computer and use it in GitHub Desktop.
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