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

Administrator / pygame_lesson5_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_lesson5_diy2
  • pnt.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    save project · 6c0ba78a
    BellCodeEditor committed 2 years ago
    6c0ba78a
pnt.py 456 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
class Hero:
    def __int__(self,name,hp,attack):
        self.level= 1
        self.name=name
        self.hp =hp
        self.attack = attack

huamulan = Hero()
houyi = Hero()
print("huamulan",300,50)
print("houyi ",250,70)
def upgrade():
    huamulan.hp=huamalan.hp+100
    huamulan.level=huamulan.level+1
    huamulan.acttack=huamulan.acttack+20
    houyi.level=houyi.level+1
    houyi.hp=houyi.hp+50
    hpuyi.acttack=houyi.acttack+25