-
Notifications
You must be signed in to change notification settings - Fork 3
solution m3-025 #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
solution m3-025 #179
Conversation
if c == 0: | ||
is_win = True | ||
else: | ||
is_win = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
is_win = True | ||
else: | ||
is_win = False | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
is_win = False | ||
# check columns | ||
for n_column in dict_card.values(): | ||
if is_win: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
else: | ||
for c in n_column: | ||
if c == 0: | ||
is_win = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if is_win == true, why you don't break the loop? Moreover, c
is a number not a column if I understood correctly, so a single 0
is not enought, right?
break | ||
# check diagonals | ||
if not is_win: | ||
diagonal_1 = dict_card['B'][0], dict_card['I'][1], dict_card['N'][2], dict_card['G'][3], dict_card['O'][4] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can do better with a loop?
break | ||
return is_win | ||
|
||
card_1 = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to generate the cards randomly using the random library?
No description provided.