Skip to content

Devel 2#2

Open
Duron1980 wants to merge 3 commits intomasterfrom
devel_2
Open

Devel 2#2
Duron1980 wants to merge 3 commits intomasterfrom
devel_2

Conversation

@Duron1980
Copy link
Owner

module is corrected

@Duron1980 Duron1980 requested a review from shorodilov December 16, 2022 12:57
Copy link

@shorodilov shorodilov left a comment

Choose a reason for hiding this comment

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

7/10

player.defence(enemy)
except Enemy_down as error:
print(f'YOUR ATTACK IS SUCCESSFUL! {error}')
exit = input('Do you wont to continue (y/n):')

Choose a reason for hiding this comment

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

Цього у завдані не було

Choose a reason for hiding this comment

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

Ладно, хай буде

break
enemy_health_level += 1
enemy = Enemy(enemy_health_level)
player.health_points += 1

Choose a reason for hiding this comment

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

Цього я також у завдані не памʼятаю, але ладно - хай буде


def descrease_health(self):
self.health_points -= 1
if self.health_points == 0:

Choose a reason for hiding this comment

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

Suggested change
if self.health_points == 0:
if self.health_points < 1:

def descrease_health(self):
self.health_points -= 1
if self.health_points == 0:
msg = f'Enemy is draw. His heals equal {self.health_points}'

Choose a reason for hiding this comment

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

Suggested change
msg = f'Enemy is draw. His heals equal {self.health_points}'
msg = f'Enemy is down. His heals equal {self.health_points}'

else:
return False

def attack(self, enemy_obj: object):

Choose a reason for hiding this comment

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

Не вистачає повідомленя для нічиєї

print(
f"YOUR ATTACK IS FAILED!\n{self.player_name} health is: {self.health_points} \n Enemy health is: {enemy_obj.health_points}")

def defence(self, enemy_obj: object):

Choose a reason for hiding this comment

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

Те саме, що для attack

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