Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Conversation

bogachev-pa
Copy link
Collaborator

No description provided.

else:
# having 2 or more doras and 2 shanten, let's go for formal
# tempai starting from 12th turn
return (self.player.round_step >= 12)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки не нужны

if self.player.ai.ukeire <= 16:
return True
elif self.player.ai.ukeire <= 28:
return (self.player.round_step >= 12)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

elif self.player.ai.ukeire <= 28:
return (self.player.round_step >= 12)
else:
return (self.player.round_step >= 13)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

return (self.player.round_step >= 13)
elif dora_count == 1:
if self.player.ai.ukeire <= 16:
return (self.player.round_step >= 12)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

if self.player.ai.ukeire <= 16:
return (self.player.round_step >= 12)
elif self.player.ai.ukeire <= 28:
return (self.player.round_step >= 13)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

elif self.player.ai.ukeire <= 28:
return (self.player.round_step >= 13)
else:
return (self.player.round_step >= 14)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

return (self.player.round_step >= 14)
else:
if self.player.ai.ukeire <= 16:
return (self.player.round_step >= 13)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)

if self.player.ai.ukeire <= 16:
return (self.player.round_step >= 13)
else:
return (self.player.round_step >= 14)
Copy link
Contributor

Choose a reason for hiding this comment

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

Скобки)


# Now we move to 11th turn, we have 2 shanten and no doras,
# we should go for formal tempai
self.player.add_discarded_tile(Tile(0, True))
Copy link
Contributor

Choose a reason for hiding this comment

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

Думаю дальше должна быть строка:

self.assertEqual(strategy.should_activate_strategy(), True)


# for 1 shanten we check number of doras and ukeire to determine
# correct time to go for formal tempai
if self.player.ai.previous_shanten == 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

Ещё это дело вкуса, но я бы переписал все эти блоки без else. Мы делаем return из первого ифа, так что особо else тут не нужен.

@Nihisil Nihisil merged commit ddd449e into dev Aug 25, 2018
@Nihisil Nihisil deleted the formal_tempai branch August 25, 2018 02:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants