Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
One lines showing off what terminedia 0.3 can do
(globals().__setitem__("g", globals().__setitem__),g("i", __import__) ,g("TM", i("terminedia")),g("C", TM.Color),g("tt", TM.utils.get_current_tick),g("sc", TM.Screen()), g("t",TM.shape((80,5))), g("t2",TM.shape((40,10))), t.text[4].at((0,0), "Feliz Aniversário,"), t2.text[8].at((0,0), "Ikke!"), g("aa", sc.data.sprites.add),g("s2", aa(t2, active=True, pos=(0,16))), g("s", aa(t, active=True, pos=(5, 10))),g("a", lambda s, t: s.transformers.append(t)), g("T", TM.Transformer),a(s2, T(effects=(lambda pos, tick: TM.Effects.blink * ((tick // 5 + pos[0]) %2) * (pos[1] % 2)), foreground=(lambda pos, tick: C(("#ff0","#fa0")[pos.x %2]) + C((0,0,((tick * 10) % 256) * (pos.x%2)))), char=(lambda char, pos: char == " " and " " or "\u25cf\u25a0"[pos[0] % 2]))), a(s, TM.transformers.GradientTransformer(TM.utils.Gradient([(0, "white"), (.5, (0.3, 0.3, 1)), (1, "white")]))),[sc.update() for _ in (type("_", (),{"__iter__": (lambda s:s),"__next__": (lambda sl: setattr(s2, "pos", (tt() % 40, 16 - (tt() // 2 ) % 16) ))} )())])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment