From 06154e61fd85dc368f0f3bbe3a88ef53fbec14ef Mon Sep 17 00:00:00 2001 From: ObeseTermite Date: Sat, 29 Mar 2025 08:35:54 -0700 Subject: [PATCH] First Commit --- pashacows/autokitteh.cow | 30 +++++++++++++ pashacows/chipotle.cow | 31 +++++++++++++ pashacows/daftpunk.cow | 23 ++++++++++ pashacows/pikachu1.cow | 29 ++++++++++++ pashacows/pikachu2.cow | 18 ++++++++ pashacows/pitbull1.cow | 27 +++++++++++ pashacows/pitbull2.cow | 26 +++++++++++ pashacows/temporal.cow | 30 +++++++++++++ pashacows/washington.cow | 21 +++++++++ pashacows/zhu.cow | 21 +++++++++ program.py | 96 ++++++++++++++++++++++++++++++++++++++++ 11 files changed, 352 insertions(+) create mode 100644 pashacows/autokitteh.cow create mode 100644 pashacows/chipotle.cow create mode 100644 pashacows/daftpunk.cow create mode 100644 pashacows/pikachu1.cow create mode 100644 pashacows/pikachu2.cow create mode 100644 pashacows/pitbull1.cow create mode 100644 pashacows/pitbull2.cow create mode 100644 pashacows/temporal.cow create mode 100644 pashacows/washington.cow create mode 100644 pashacows/zhu.cow create mode 100755 program.py diff --git a/pashacows/autokitteh.cow b/pashacows/autokitteh.cow new file mode 100644 index 0000000..967895a --- /dev/null +++ b/pashacows/autokitteh.cow @@ -0,0 +1,30 @@ +# autokitteh +$the_cow = < window_height: + break + screen.blit(text_surface, (16, current_y)) + current_y += text_surface.get_height() + + pygame.display.flip() + +# Handle dragging +is_dragging = False +drag_start_y = 0 + +def handle_drag(event): + global is_dragging, drag_start_y, scroll_y + if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1: + is_dragging = True + drag_start_y = event.pos[1] + elif event.type == pygame.MOUSEBUTTONUP and event.button == 1: + is_dragging = False + elif event.type == pygame.MOUSEMOTION and is_dragging: + drag_distance = event.pos[1] - drag_start_y + scroll_y += drag_distance + drag_start_y = event.pos[1] + scroll_y = max(min(scroll_y, 0), -(len(text_content.split("\n")) * font.get_height()-window_height)) + if (len(text_content.split("\n")) * font.get_height()) < window_height: + scroll_y = 0 + +# Create a thread to periodically update the command output +update_thread = Thread(target=update_output) +update_thread.daemon = True +update_thread.start() + +# Main game loop +running = True +while running: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + handle_drag(event) + + render_text() + pygame.time.Clock().tick(30) + +pygame.quit() +