Skip to content

Commit ddb5969

Browse files
committed
reduced cognitive complexity of the main function game_engine.py
1 parent 7704049 commit ddb5969

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

brain_games/game_engine.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@
44

55
def game_engine(get_question_and_answer, introduction):
66
username = prompt.string(''.join(const.GREETING))
7-
87
print(f'Hello, {username}!')
98
print(''.join(introduction))
10-
119
for _ in range(const.GAMES_TO_WIN):
1210
question, answer = get_question_and_answer()
13-
# print(f'TESTPRINT, question, answer: {question}, {answer}')
14-
1511
print(f'Question: {question}')
1612
user_answer = prompt.string('Your answer: ')
1713
if user_answer == answer:
@@ -23,5 +19,4 @@ def game_engine(get_question_and_answer, introduction):
2319
f"Let's try again, {username}!"
2420
)
2521
return
26-
2722
print(f'Congratulations, {username}!')

0 commit comments

Comments
 (0)