Skip to content

improve is_tie#4

Open
VectorLu wants to merge 1 commit into
mainfrom
dev_vector
Open

improve is_tie#4
VectorLu wants to merge 1 commit into
mainfrom
dev_vector

Conversation

@VectorLu

Copy link
Copy Markdown
Collaborator

improve is_tie

improve is_tie

@VectorLu VectorLu left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@linksequel linksequel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提出一点问题

Comment thread mcr.py
if is_win(game):
return False
# 使用 all 函数和列表推导式检查每一行的每个单元格是否都不为空
if all(all(cell!= '' for cell in row) for row in game):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all是什么意思

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all 函数和列表推导式来检查游戏中的每一行。对于每一行,我们使用另一个 all 函数和列表推导式检查该行的每个单元格是否都不为空

Comment thread mcr.py
return tie
tie = True
return tie
if is_win(game):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

非常棒的命名

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tie是什么意思

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tie是什么意思

平局

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.

3 participants