Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hacksaar
Haxotel
Commits
c908f621
Commit
c908f621
authored
Aug 01, 2014
by
Ralf
Browse files
fix conny's brackets
parent
438bcf07
Changes
1
Hide whitespace changes
Inline
Side-by-side
player.py
View file @
c908f621
...
...
@@ -75,7 +75,7 @@ class Player(Thing):
if
thing
!=
self
and
isinstance
(
thing
,
Player
):
playerToPush
=
thing
self
.
send
(
"After coming out of the wall with incredible speed, you hit another player, who is in turn pushed away by your momentum. Poor bastard..."
)
self
.
game
.
labyrinth
.
moveThing
(
self
,
pushTarget
,(
lambda
:
playerToPush
.
pushAway
(
self
)
if
playerToPush
else
None
)
)
self
.
game
.
labyrinth
.
moveThing
(
self
,
pushTarget
,(
lambda
:
playerToPush
.
pushAway
(
self
)
)
if
playerToPush
else
None
)
# high(er)-level functions
def
readCmd
(
self
,
cmd
):
...
...
@@ -104,7 +104,7 @@ class Player(Thing):
playerToPush
=
thing
self
.
send
(
"By moving to the "
+
direction
[
0
]
+
" you pushed another player away."
)
self
.
game
.
labyrinth
.
moveThing
(
self
,
target
,
(
lambda
:
playerToPush
.
pushAway
(
self
,
direction
[
0
])
if
playerToPush
else
None
)
)
self
.
game
.
labyrinth
.
moveThing
(
self
,
target
,
(
lambda
:
playerToPush
.
pushAway
(
self
,
direction
[
0
])
)
if
playerToPush
else
None
)
elif
verb
in
sayVerbs
:
msg
=
" "
.
join
(
words
[
1
:])
...
...
Write
Preview
Supports
Markdown
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