Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def demo(screen):
scenes = [ ]
effects = [
Print(screen, ImageFile( IMG_COWBOY, screen.height - 2,
colours=screen.colours),
0,
stop_frame = 200 ),
# Print(screen,
# FigletText( COMPANY, font = 'digital' ),
# screen.height // 2 - 3,
# colour = 1,
# bg = 2 if screen.unicode_aware else 0 )
Print( screen, COMPANY )
]
scenes.append(Scene(effects))
effects = [
Print(screen,
FigletText("W A S T E L A N D S",
font='diamond' if screen.width > 80 else 'banner'),
effects = [
Print(screen, ImageFile( IMG_COWBOY, screen.height - 2,
colours=screen.colours),
0,
stop_frame = 200 ),
# Print(screen,
# FigletText( COMPANY, font = 'digital' ),
# screen.height // 2 - 3,
# colour = 1,
# bg = 2 if screen.unicode_aware else 0 )
Print( screen, COMPANY )
]
scenes.append(Scene(effects))
effects = [
Print(screen,
FigletText("W A S T E L A N D S",
font='diamond' if screen.width > 80 else 'banner'),
screen.height // 2 - 3,
colour = 1, bg = 2 if screen.unicode_aware else 0 ),
]
scenes.append(Scene(effects))
screen.play(scenes, stop_on_resize=True)
stop_frame=30),
Print(screen,
FigletText("I'm", "banner3"),
(screen.height - 4) // 2,
colour=Screen.COLOUR_BLACK,
speed=1,
start_frame=30,
stop_frame=50),
Print(screen,
FigletText("on", "banner3"),
(screen.height - 4) // 2,
colour=Screen.COLOUR_BLACK,
speed=1,
start_frame=50,
stop_frame=70),
Print(screen,
FigletText("Fire!", "banner3"),
(screen.height - 4) // 2,
colour=Screen.COLOUR_BLACK,
speed=1,
start_frame=70),
]
scenes.append(Scene(effects, 100))
text = Figlet(font="banner", width=200).renderText("ASCIIMATICS")
width = max([len(x) for x in text.split("\n")])
effects = [
Print(screen,
Fire(screen.height, 80, text, 0.4, 40, screen.colours),
0,
speed=1,
start_frame=50,
stop_frame=70),
Print(screen,
FigletText("Fire!", "banner3"),
(screen.height - 4) // 2,
colour=Screen.COLOUR_BLACK,
speed=1,
start_frame=70),
]
scenes.append(Scene(effects, 100))
text = Figlet(font="banner", width=200).renderText("ASCIIMATICS")
width = max([len(x) for x in text.split("\n")])
effects = [
Print(screen,
Fire(screen.height, 80, text, 0.4, 40, screen.colours),
0,
speed=1,
transparent=False),
Print(screen,
FigletText("ASCIIMATICS", "banner"),
screen.height - 9, x=(screen.width - width) // 2 + 1,
colour=Screen.COLOUR_BLACK,
bg=Screen.COLOUR_BLACK,
speed=1),
Print(screen,
FigletText("ASCIIMATICS", "banner"),
screen.height - 9,
colour=Screen.COLOUR_WHITE,
bg=Screen.COLOUR_WHITE,
speed=1),
def _credits(screen):
scenes = []
text = Figlet(font="banner", width=200).renderText("ASCIIMATICS")
width = max([len(x) for x in text.split("\n")])
effects = [
Print(screen,
Fire(screen.height, 80, text, 0.4, 40, screen.colours),
0,
speed=1,
transparent=False),
Print(screen,
FigletText("ASCIIMATICS", "banner"),
screen.height - 9, x=(screen.width - width) // 2 + 1,
colour=Screen.COLOUR_BLACK,
bg=Screen.COLOUR_BLACK,
speed=1),
Print(screen,
FigletText("ASCIIMATICS", "banner"),
screen.height - 9,
colour=Screen.COLOUR_WHITE,
bg=Screen.COLOUR_WHITE,
speed=1),
]
scenes.append(Scene(effects, 100))
effects = [
Matrix(screen, stop_frame=200),
stop_frame=50),
Print(screen,
SpeechBubble("Wheeeeeee!"),
y=centre[1],
colour=Screen.COLOUR_CYAN,
clear=True,
start_frame=100,
stop_frame=250),
Print(screen,
SpeechBubble("A world of possibilities awaits you...", "L"),
x=18, y=0,
colour=Screen.COLOUR_CYAN,
clear=True,
start_frame=350,
stop_frame=400),
Print(screen, ImageFile("globe.gif"), 0,
start_frame=400),
]
scenes.append(Scene(effects, 600))
effects = [
Matrix(screen, stop_frame=200),
Mirage(
screen,
FigletText("Asciimatics"),
screen.height // 2 - 3,
Screen.COLOUR_GREEN,
start_frame=100,
stop_frame=200),
Wipe(screen, start_frame=150),
Cycle(
screen,
inky = 14
pinky = 201
blinky = 9
clyde = 208
effects = [
PacMan(screen, path),
Ghost(screen, deepcopy(path), inky, start_frame=40),
Ghost(screen, deepcopy(path), pinky, start_frame=60),
Ghost(screen, deepcopy(path), blinky, start_frame=80),
Ghost(screen, deepcopy(path), clyde, start_frame=100),
]
for x in range(5, screen.width, 16):
effects.insert(0,
Print(screen,
StaticRenderer(images=[dot]),
screen.height // 2,
x=x,
speed=1,
stop_frame=4))
scenes.append(Scene(effects, 100 + screen.width))
# Scene 2 - Chase ghosts after a power pill
scenes.append(EatingScene(screen))
# Scene 3 - Thanks...
effects = [
Print(screen, FigletText("Thank you,"), screen.height // 3 - 3,
colour=Screen.COLOUR_RED),
Print(screen,
# Scene 7.
path = Path()
path.jump_to(podium[0], podium[1])
path.wait(60)
path.move_straight_to(-5, podium[1], 20)
path.wait(300)
effects = [
Arrow(screen, path, colour=Screen.COLOUR_GREEN),
_speak(screen, "Goodbye!", podium, 10),
Cycle(screen,
FigletText("THE END!"),
centre[1] - 4,
start_frame=100),
Print(screen, SpeechBubble("Press X to exit"), centre[1] + 6,
start_frame=150)
]
scenes.append(Scene(effects, 500))
screen.play(scenes, stop_on_resize=True)
def demo(screen):
effects = [
Print(screen, Rainbow(screen, FigletText("256 colours")),
y=screen.height//2 - 8),
Print(screen, Rainbow(screen, FigletText("for xterm users")),
y=screen.height//2 + 3),
Clock(screen, screen.width//2, screen.height//2, screen.height//2),
]
screen.play([Scene(effects, -1)], stop_on_resize=True)
StaticRenderer(images=YULE_LOG),
x=log_x,
y=log_y,
colour=1,
speed=1,
transparent=True),
]
if screen_height > 40:
effects += [
Print(
screen,
FigletText("MERRY", font='univers'),
1,
speed=1,
start_frame=5),
Print(
screen,
FigletText("CHRISTMAS!", font='univers'),
10,
speed=1,
start_frame=15),
]
scenes.append(Scene(effects, -1))
screen.play(scenes, stop_on_resize=True)