Made it usable as module.
This commit is contained in:
parent
d085bd72af
commit
b8369e0bf8
1 changed files with 42 additions and 39 deletions
|
@ -56,11 +56,14 @@ def berechneflugbahn(cow, xmin, xmax, ymin, ymax, startwinkel, startgeschwindigk
|
|||
|
||||
# some useful control
|
||||
clear, home, curoff, curon = "'\x1b[2J\x1b[H", "\x1b[H", "\x1b[?25l", "\x1b[?25h"
|
||||
|
||||
|
||||
# set position of cursor
|
||||
def curpos(x, y):
|
||||
print("\033[%d;%dH" % (ymax - y, x), end="", flush=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Randomly choose a cow
|
||||
cows = "🐵🐒🦍🦧🐕🐯🦝🐩🐅🐴🐎🦄🦌🐗🐂🐃🐄🐪🐫🦙🦒🐹🦘🦡🐧🕊️ 🦅🦆🦉🐍🦎🐊🦜🦚🦩🐲🐉🦕"
|
||||
cowlistlength = len(cows)
|
||||
|
|
Loading…
Reference in a new issue