Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson15_1
This project
Loading...
Sign in
Toggle navigation
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
Commit
1a0779c6
authored
4 years ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
37c5806e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
diy1.py
diy1.py
View file @
1a0779c6
...
...
@@ -19,7 +19,14 @@ class Hero(object):
info
=
info_1
+
info_2
+
info_3
print
(
into
)
exit
()
class
Player
(
Hero
):
def__init__
(
self
,
name
,
hero_type
):
super
(
Player
,
self
)
.
__init__
(
name
)
self
.
hp
=
160
self
.
attack
=
60
self
.
hero_type
=
hero_type
print
(
self
.
name
+
'角色创建成功'
+
'英雄属性是:'
+
self
.
hero_type
)
print
(
'等级,血量,攻击力分别是'
,
self
.
level
,
self
.
hp
,
self
.
attack
)
yase
=
Hero
(
"垭瑟"
)
houyi
=
Hero
(
"后羿"
)
yase
.
combat
(
houyi
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment