From 401b3a332bc6560213d5678cbeddac1e235dcc72 Mon Sep 17 00:00:00 2001 From: Jonas Zeunert Date: Tue, 30 Aug 2022 21:51:19 +0200 Subject: [PATCH] Add Sounds --- Solenoid.py | 1 - Sound.py | 9 +++++++++ sounds/AnotherCoin.py | 5 +++++ sounds/BeCareful.py | 5 +++++ sounds/ChallengeChamp.py | 5 +++++ sounds/Countdown.py | 5 +++++ sounds/GameTimeBonus.py | 5 +++++ sounds/GoSpecial.py | 5 +++++ sounds/HighLevel.py | 5 +++++ sounds/IAmChamp.py | 5 +++++ sounds/LowScore.py | 5 +++++ sounds/MaxScore.py | 5 +++++ sounds/Naughty.py | 5 +++++ sounds/PlayGently.py | 5 +++++ sounds/Quick.py | 5 +++++ sounds/Red.py | 5 +++++ sounds/Seconds.py | 5 +++++ sounds/ShootSpecial.py | 5 +++++ sounds/SpecialAgain.py | 5 +++++ sounds/TheLastBall.py | 5 +++++ sounds/Thirty.py | 5 +++++ sounds/TimeOver.py | 5 +++++ sounds/TimeShort.py | 5 +++++ sounds/TryHarder.py | 5 +++++ sounds/Twenty.py | 5 +++++ sounds/WoW.py | 5 +++++ sounds/Yellow.py | 5 +++++ sounds/YoureChamp.py | 5 +++++ sounds/YoureGood.py | 5 +++++ sounds/__init__.py | 16 ++++++++++++++++ 30 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 Sound.py create mode 100644 sounds/AnotherCoin.py create mode 100644 sounds/BeCareful.py create mode 100644 sounds/ChallengeChamp.py create mode 100644 sounds/Countdown.py create mode 100644 sounds/GameTimeBonus.py create mode 100644 sounds/GoSpecial.py create mode 100644 sounds/HighLevel.py create mode 100644 sounds/IAmChamp.py create mode 100644 sounds/LowScore.py create mode 100644 sounds/MaxScore.py create mode 100644 sounds/Naughty.py create mode 100644 sounds/PlayGently.py create mode 100644 sounds/Quick.py create mode 100644 sounds/Red.py create mode 100644 sounds/Seconds.py create mode 100644 sounds/ShootSpecial.py create mode 100644 sounds/SpecialAgain.py create mode 100644 sounds/TheLastBall.py create mode 100644 sounds/Thirty.py create mode 100644 sounds/TimeOver.py create mode 100644 sounds/TimeShort.py create mode 100644 sounds/TryHarder.py create mode 100644 sounds/Twenty.py create mode 100644 sounds/WoW.py create mode 100644 sounds/Yellow.py create mode 100644 sounds/YoureChamp.py create mode 100644 sounds/YoureGood.py create mode 100644 sounds/__init__.py diff --git a/Solenoid.py b/Solenoid.py index f937583..47cfd2c 100644 --- a/Solenoid.py +++ b/Solenoid.py @@ -1,4 +1,3 @@ -from networking.Networking import Networking from utils.util import normalizeName from __main__ import networking diff --git a/Sound.py b/Sound.py new file mode 100644 index 0000000..b5e394d --- /dev/null +++ b/Sound.py @@ -0,0 +1,9 @@ +from __main__ import networking + +class Sound: + def __init__(self, id): + self.name = "Sound " + str(id) + pass + + def play(self, name): + networking.playSound(self.name) \ No newline at end of file diff --git a/sounds/AnotherCoin.py b/sounds/AnotherCoin.py new file mode 100644 index 0000000..409316d --- /dev/null +++ b/sounds/AnotherCoin.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class AnotherCoin(Sound): + def __init__(self): + self.name = '''Speech 15: "Another coin please."''' \ No newline at end of file diff --git a/sounds/BeCareful.py b/sounds/BeCareful.py new file mode 100644 index 0000000..9f09162 --- /dev/null +++ b/sounds/BeCareful.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class BeCareful(Sound): + def __init__(self): + self.name = '''Speech 11: "Be careful."''' \ No newline at end of file diff --git a/sounds/ChallengeChamp.py b/sounds/ChallengeChamp.py new file mode 100644 index 0000000..feb1306 --- /dev/null +++ b/sounds/ChallengeChamp.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class ChallengeChamp(Sound): + def __init__(self): + self.name = '''Speech 5: "Challenge the champ!"''' \ No newline at end of file diff --git a/sounds/Countdown.py b/sounds/Countdown.py new file mode 100644 index 0000000..62cc06e --- /dev/null +++ b/sounds/Countdown.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Countdown(Sound): + def __init__(self): + self.name = '''Speech 4: "Five, Four, Three, Two, One."''' \ No newline at end of file diff --git a/sounds/GameTimeBonus.py b/sounds/GameTimeBonus.py new file mode 100644 index 0000000..5915b62 --- /dev/null +++ b/sounds/GameTimeBonus.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class GameTimeBonus(Sound): + def __init__(self): + self.name = '''Speech 13: "Be ready for the Game Time Bonus."''' \ No newline at end of file diff --git a/sounds/GoSpecial.py b/sounds/GoSpecial.py new file mode 100644 index 0000000..2b9ea85 --- /dev/null +++ b/sounds/GoSpecial.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class GoSpecial(Sound): + def __init__(self): + self.name = '''Speech 27: "Go for the Special."''' \ No newline at end of file diff --git a/sounds/HighLevel.py b/sounds/HighLevel.py new file mode 100644 index 0000000..5fa8924 --- /dev/null +++ b/sounds/HighLevel.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class HighLevel(Sound): + def __init__(self): + self.name = '''Speech 20: "Go for the high level board."''' \ No newline at end of file diff --git a/sounds/IAmChamp.py b/sounds/IAmChamp.py new file mode 100644 index 0000000..80cc03c --- /dev/null +++ b/sounds/IAmChamp.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class IAmChamp(Sound): + def __init__(self): + self.name = '''Speech 17: "I am the champ! Challenge me!"''' \ No newline at end of file diff --git a/sounds/LowScore.py b/sounds/LowScore.py new file mode 100644 index 0000000..0872826 --- /dev/null +++ b/sounds/LowScore.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Seconds(Sound): + def __init__(self): + self.name = '''Speech 9: "What a low score!"''' \ No newline at end of file diff --git a/sounds/MaxScore.py b/sounds/MaxScore.py new file mode 100644 index 0000000..2a9fccb --- /dev/null +++ b/sounds/MaxScore.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Seconds(Sound): + def __init__(self): + self.name = '''Speech 8: "This is a maximum score."''' \ No newline at end of file diff --git a/sounds/Naughty.py b/sounds/Naughty.py new file mode 100644 index 0000000..d2174b8 --- /dev/null +++ b/sounds/Naughty.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Naughty(Sound): + def __init__(self): + self.name = '''Speech 14: "That's naughty!"''' \ No newline at end of file diff --git a/sounds/PlayGently.py b/sounds/PlayGently.py new file mode 100644 index 0000000..5cac599 --- /dev/null +++ b/sounds/PlayGently.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class PlayGently(Sound): + def __init__(self): + self.name = '''Speech 21: "Play gently to beat me."''' \ No newline at end of file diff --git a/sounds/Quick.py b/sounds/Quick.py new file mode 100644 index 0000000..8f43122 --- /dev/null +++ b/sounds/Quick.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Quick(Sound): + def __init__(self): + self.name = '''Speech 22: "Quick! Hit the Special"''' \ No newline at end of file diff --git a/sounds/Red.py b/sounds/Red.py new file mode 100644 index 0000000..5a7235f --- /dev/null +++ b/sounds/Red.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Red(Sound): + def __init__(self): + self.name = '''Speech 25: "Red"''' \ No newline at end of file diff --git a/sounds/Seconds.py b/sounds/Seconds.py new file mode 100644 index 0000000..5913c28 --- /dev/null +++ b/sounds/Seconds.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Seconds(Sound): + def __init__(self): + self.name = '''Speech 3: "Seconds"''' \ No newline at end of file diff --git a/sounds/ShootSpecial.py b/sounds/ShootSpecial.py new file mode 100644 index 0000000..3d6ee7d --- /dev/null +++ b/sounds/ShootSpecial.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class ShootSpecial(Sound): + def __init__(self): + self.name = '''Speech 23: "Shoot the special."''' \ No newline at end of file diff --git a/sounds/SpecialAgain.py b/sounds/SpecialAgain.py new file mode 100644 index 0000000..3b202b8 --- /dev/null +++ b/sounds/SpecialAgain.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class SpecialAgain(Sound): + def __init__(self): + self.name = '''Speech 19: "Once again for the special."''' \ No newline at end of file diff --git a/sounds/TheLastBall.py b/sounds/TheLastBall.py new file mode 100644 index 0000000..c63aaca --- /dev/null +++ b/sounds/TheLastBall.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class TheLastBall(Sound): + def __init__(self): + self.name = '''Speech 12: "The last ball."''' \ No newline at end of file diff --git a/sounds/Thirty.py b/sounds/Thirty.py new file mode 100644 index 0000000..83fba63 --- /dev/null +++ b/sounds/Thirty.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Thirty(Sound): + def __init__(self): + self.name = '''Speech 24: "Thirty"''' \ No newline at end of file diff --git a/sounds/TimeOver.py b/sounds/TimeOver.py new file mode 100644 index 0000000..adf70c3 --- /dev/null +++ b/sounds/TimeOver.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class TimeOver(Sound): + def __init__(self): + self.name = '''Speech 16: "Sorry. The time is over."''' \ No newline at end of file diff --git a/sounds/TimeShort.py b/sounds/TimeShort.py new file mode 100644 index 0000000..4b7a6d8 --- /dev/null +++ b/sounds/TimeShort.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class TimeShort(Sound): + def __init__(self): + self.name = '''Speech 18: "Time is short."''' \ No newline at end of file diff --git a/sounds/TryHarder.py b/sounds/TryHarder.py new file mode 100644 index 0000000..0ed17cc --- /dev/null +++ b/sounds/TryHarder.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class TryHarder(Sound): + def __init__(self): + self.name = '''Speech 10: "Try harder!"''' \ No newline at end of file diff --git a/sounds/Twenty.py b/sounds/Twenty.py new file mode 100644 index 0000000..9c3b46e --- /dev/null +++ b/sounds/Twenty.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Twenty(Sound): + def __init__(self): + self.name = '''Speech 2: "Twenty"''' \ No newline at end of file diff --git a/sounds/WoW.py b/sounds/WoW.py new file mode 100644 index 0000000..0eaf1be --- /dev/null +++ b/sounds/WoW.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class WoW(Sound): + def __init__(self): + self.name = '''Speech 7: "WoW."''' \ No newline at end of file diff --git a/sounds/Yellow.py b/sounds/Yellow.py new file mode 100644 index 0000000..b618f33 --- /dev/null +++ b/sounds/Yellow.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class Yellow(Sound): + def __init__(self): + self.name = '''Speech 26: "Yellow"''' \ No newline at end of file diff --git a/sounds/YoureChamp.py b/sounds/YoureChamp.py new file mode 100644 index 0000000..d9975a8 --- /dev/null +++ b/sounds/YoureChamp.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class YoureChamp(Sound): + def __init__(self): + self.name = '''Speech 6: "Good. You're a champ!"''' \ No newline at end of file diff --git a/sounds/YoureGood.py b/sounds/YoureGood.py new file mode 100644 index 0000000..8d76f67 --- /dev/null +++ b/sounds/YoureGood.py @@ -0,0 +1,5 @@ +from Sound import Sound + +class YoureGood(Sound): + def __init__(self): + self.name = '''Speech 1: "You're good! But I'm still the Champ!"''' diff --git a/sounds/__init__.py b/sounds/__init__.py new file mode 100644 index 0000000..b9149e9 --- /dev/null +++ b/sounds/__init__.py @@ -0,0 +1,16 @@ +__all__ = [] + +import pkgutil +import inspect + +__path__ = pkgutil.extend_path(__path__, __name__) + +for loader, name, is_pkg in pkgutil.walk_packages(__path__): + module = loader.find_module(name).load_module(name) + + for name, value in inspect.getmembers(module): + if name.startswith('__'): + continue + + globals()[name] = value + __all__.append(name)