Skip to content

Conversation

Stefano-A
Copy link
Collaborator

No description provided.

if c == 0:
is_win = True
else:
is_win = False
Copy link

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
Copy link

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:
Copy link

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
Copy link

@effedib effedib Jan 13, 2025

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]
Copy link

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 = {
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants