Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
Haxotel
Commits
80d2bd44
Commit
80d2bd44
authored
Aug 01, 2014
by
Constantin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
euclid grammar and blocks move
parent
19d129d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
euclid.py
euclid.py
+6
-3
No files found.
euclid.py
View file @
80d2bd44
...
...
@@ -30,15 +30,15 @@ class Euclid (Npc):
return
resp
if
not
self
.
questionAsked
:
self
.
questionAsked
=
True
return
(
"ask
s
"
,
self
.
question
,
None
)
return
(
"ask"
,
self
.
question
,
None
)
else
:
if
self
.
answerChecker
(
message
):
# correct answer
self
.
npc
.
correctAnswerGiven
=
True
newq
,
newac
=
random
.
choice
(
Euclid
.
questions
)
return
(
"say
s
"
,
"That answer is correct. I will go annoy people somewhere else. Good Bye."
,
Euclid
.
DLevel
(
self
.
npc
))
return
(
"say"
,
"That answer is correct. I will go annoy people somewhere else. Good Bye."
,
Euclid
.
DLevel
(
self
.
npc
))
else
:
# wrong answer
return
(
"shout
s
"
,
"WRONG! "
+
self
.
question
,
None
)
return
(
"shout"
,
"WRONG! "
+
self
.
question
,
None
)
def
__init__
(
self
,
game
):
super
().
__init__
(
game
,
Euclid
.
DLevel
(
self
))
...
...
@@ -50,6 +50,9 @@ class Euclid (Npc):
def
__repr__
(
self
):
return
"E"
def
blocksMove
(
self
):
return
True
def
afterAnswering
(
self
):
if
self
.
correctAnswerGiven
:
self
.
correctAnswerGiven
=
False
...
...
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