Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson16_2
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
2f9c7b8c
authored
Nov 13, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
e52696af
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
diy1.py
diy1.py
View file @
2f9c7b8c
import
random
class
Hero
(
object
):
class
Hero
(
object
):
def
__init__
(
self
,
name
):
def
__init__
(
self
,
name
):
self
.
name
=
name
self
.
name
=
name
...
@@ -53,8 +54,19 @@ print(" 开始游戏")
...
@@ -53,8 +54,19 @@ print(" 开始游戏")
print
(
"-"
*
50
)
print
(
"-"
*
50
)
while
True
:
while
True
:
input
(
"请使用攻击技能1,回复技能2"
)
print
(
"-"
*
50
)
choice
=
input
(
"请使用攻击技能1,回复技能2:"
)
if
choice
==
"1"
:
houyi
.
combat
(
yase
)
print
(
"向对方攻击"
)
elif
choice
==
"2"
:
print
(
"使用恢复"
)
houyi
.
cure
()
elif
choice
==
"q"
:
exit
()
else
:
print
(
"输入有误,重新输入:"
)
random
.
...
...
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