From 15dc70ba416b9ecfc4fabf0a395c5c67cfe21c1d Mon Sep 17 00:00:00 2001 From: Brando Morley Date: Sat, 20 Jan 2024 19:45:12 -0500 Subject: [PATCH] added bomb to game --- asciiracer/environment.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/asciiracer/environment.py b/asciiracer/environment.py index ff8e173..a3387e2 100644 --- a/asciiracer/environment.py +++ b/asciiracer/environment.py @@ -56,6 +56,16 @@ def spawn_debris(state, x_ranges): def spawn_money(state, x_ranges): + + def bomb(): + return [' _______', + ' / \\', + ' / \\', + '| BOOM! |', + " \ 💥 /", + ' \_______/ ', ] + + def martini_glass(ch): return [r'╲___╱', f" ╲{ch}╱ ", @@ -80,7 +90,10 @@ def dollar_bill(): (martini_glass('G'), 5), (beer_can(), -20), (beer_can(), -20), - (beer_can(), -20)] + (beer_can(), -20), + (bomb(), -50), + (bomb(), -50), + (bomb(), -50)] return spawn_sprite(state, x_ranges, money_list, 1)