From 221cf50b08c8f89817998244e91413f2ff2aa352 Mon Sep 17 00:00:00 2001 From: Vitaly Chasovskikh <> Date: Wed, 17 Apr 2024 01:54:26 +0700 Subject: [PATCH] refac: in engine.py and scripts/ files rename brain_engine() to start_game() after 3 review --- brain_games/engine.py | 2 +- brain_games/scripts/brain_calc.py | 4 ++-- brain_games/scripts/brain_even.py | 4 ++-- brain_games/scripts/brain_gcd.py | 4 ++-- brain_games/scripts/brain_prime.py | 4 ++-- brain_games/scripts/brain_progression.py | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/brain_games/engine.py b/brain_games/engine.py index b122c83..d3daf28 100644 --- a/brain_games/engine.py +++ b/brain_games/engine.py @@ -1,7 +1,7 @@ from brain_games.cli import welcome_user -def brain_engine(game): +def start_game(game): print('Welcome to the Brain Games!') name = welcome_user() print(game.description) diff --git a/brain_games/scripts/brain_calc.py b/brain_games/scripts/brain_calc.py index 281d029..5bfd991 100644 --- a/brain_games/scripts/brain_calc.py +++ b/brain_games/scripts/brain_calc.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 -from brain_games.engine import brain_engine +from brain_games.engine import start_game import brain_games.games.calc def main(): """Run code for the brain-calc command.""" - brain_engine(brain_games.games.calc) + start_game(brain_games.games.calc) if __name__ == '__main__': diff --git a/brain_games/scripts/brain_even.py b/brain_games/scripts/brain_even.py index 0ec132c..5e55f0f 100644 --- a/brain_games/scripts/brain_even.py +++ b/brain_games/scripts/brain_even.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 -from brain_games.engine import brain_engine +from brain_games.engine import start_game import brain_games.games.even def main(): """Run code for the brain-even command.""" - brain_engine(brain_games.games.even) + start_game(brain_games.games.even) if __name__ == '__main__': diff --git a/brain_games/scripts/brain_gcd.py b/brain_games/scripts/brain_gcd.py index 552b0a7..1e3e472 100644 --- a/brain_games/scripts/brain_gcd.py +++ b/brain_games/scripts/brain_gcd.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 -from brain_games.engine import brain_engine +from brain_games.engine import start_game import brain_games.games.gcd def main(): """Run code for the brain-gcd command.""" - brain_engine(brain_games.games.gcd) + start_game(brain_games.games.gcd) if __name__ == '__main__': diff --git a/brain_games/scripts/brain_prime.py b/brain_games/scripts/brain_prime.py index 9c19f02..4eca618 100644 --- a/brain_games/scripts/brain_prime.py +++ b/brain_games/scripts/brain_prime.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 -from brain_games.engine import brain_engine +from brain_games.engine import start_game import brain_games.games.prime def main(): """Run code for the brain-prime command.""" - brain_engine(brain_games.games.prime) + start_game(brain_games.games.prime) if __name__ == '__main__': diff --git a/brain_games/scripts/brain_progression.py b/brain_games/scripts/brain_progression.py index 1ecd491..68ee849 100644 --- a/brain_games/scripts/brain_progression.py +++ b/brain_games/scripts/brain_progression.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 -from brain_games.engine import brain_engine +from brain_games.engine import start_game import brain_games.games.progression def main(): """Run code for the brain-progression command.""" - brain_engine(brain_games.games.progression) + start_game(brain_games.games.progression) if __name__ == '__main__':