Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson9_diy2

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • pygame_lesson9_diy2
  • 1.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    auto save · 723228a6
    BellCodeEditor committed a year ago
    723228a6
1.py 289 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13
class Hero:
    def __init__(self, name, hp, attack):
       self.level = 1
       self.name = name
       self.hp = hp
       self.attack = attack
    def upgrade(self):
        self.level=self.level+1
        self.hp=self.hp + 50
        self.attack=self.attack + 4