Develop#1
Open
hideman1231 wants to merge 9 commits into
Open
Conversation
ivnukov
suggested changes
Dec 25, 2020
| names = input("Enter your name: ") | ||
| print() | ||
| while True: | ||
| if Player.validate_names(names) == 0: |
| enemy = Enemy(1, 1) | ||
| while True: | ||
| try: | ||
| player.allowed_attacks = int(input("Choose your hero: 1-Wizard, 2-Warrior, 3-Rogue ")) |
There was a problem hiding this comment.
player.allowed_attacks вводит в заблуждение. назови её attack или как-то более понятно
| while True: | ||
| try: | ||
| player.allowed_attacks = int(input("Choose your hero: 1-Wizard, 2-Warrior, 3-Rogue ")) | ||
| if player.validate_allowed_attacks() == 0: |
There was a problem hiding this comment.
validate allowed attacks возвращает false или None. Почему сравнение с нулем?
| player.allowed_attacks = int(input("Choose your hero: 1-Wizard, 2-Warrior, 3-Rogue ")) | ||
| else: | ||
| player.attack(enemy) | ||
| player.allowed_attacks = int(input("Choose defense: 1-Wizard, 2-Warrior, 3-Rogue ")) |
There was a problem hiding this comment.
allowed attacks должен содержать просто 1,2,3. При вводе должно проверятся, входит ли введенное значение в список allowed attacks
| except KeyboardInterrupt: | ||
| pass | ||
| finally: | ||
| print() |
| if command == "START": | ||
| next_lvl = 1 | ||
| names = input("Enter your name: ") | ||
| print() |
| try: | ||
| play() | ||
| except GameOver: | ||
| GameOver.write_score(score_list[-1], name_list[-1]) |
There was a problem hiding this comment.
Имеет смысл просто передать объект игрока и получить оттуда счет и имя. Зачем здесь списки непонятно
| elif attack == 2 and defense == 1: | ||
| return -1 | ||
| elif attack == 3 and defense == 2: | ||
| return -1 |
ivnukov
approved these changes
Dec 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.