Toggle Navigation
Hatchery
Eggs
controlsQuest
__init__.py
Login
Register
__init__.py
Content
import ugfx, utime, buttons def clear_screen(): ugfx.clear(ugfx.WHITE) ugfx.flush() def msg(txt): clear_screen() ugfx.string(0, 0, txt, "pixelade13", ugfx.BLACK) ugfx.flush() def main(): val = 0 ugfx.init() msg("Find easter egg! :)") while True: if buttons.value(buttons.BTN_UP): val += 2 msg("UP!") elif buttons.value(buttons.BTN_DOWN): val -= 2 msg("DOWN!") elif buttons.value(buttons.BTN_LEFT): val -=1 msg("LEFT!") elif buttons.value(buttons.BTN_RIGHT): val += 1 msg("RIGHT!") elif buttons.value(buttons.BTN_A): val = 0 msg("ENTER!") elif buttons.value(buttons.BTN_B): msg("EXIT!") else: if val > 12: msg("Easter EGG !!!") utime.sleep_ms(100) main()