Skip to content

Commit

Permalink
refac: in engine.py and scripts/ files rename brain_engine() to start…
Browse files Browse the repository at this point in the history
…_game() after 3 review
  • Loading branch information
Vitaly Chasovskikh committed Apr 16, 2024
1 parent 7b7ee1f commit 221cf50
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion brain_games/engine.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions brain_games/scripts/brain_calc.py
Original file line number Diff line number Diff line change
@@ -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__':
Expand Down
4 changes: 2 additions & 2 deletions brain_games/scripts/brain_even.py
Original file line number Diff line number Diff line change
@@ -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__':
Expand Down
4 changes: 2 additions & 2 deletions brain_games/scripts/brain_gcd.py
Original file line number Diff line number Diff line change
@@ -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__':
Expand Down
4 changes: 2 additions & 2 deletions brain_games/scripts/brain_prime.py
Original file line number Diff line number Diff line change
@@ -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__':
Expand Down
4 changes: 2 additions & 2 deletions brain_games/scripts/brain_progression.py
Original file line number Diff line number Diff line change
@@ -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__':
Expand Down

0 comments on commit 221cf50

Please sign in to comment.