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
1ae6e89e
Commit
1ae6e89e
authored
Aug 01, 2014
by
Ralf
Browse files
bunch of small fixes
parent
45beb26f
Changes
3
Hide whitespace changes
Inline
Side-by-side
game.py
View file @
1ae6e89e
...
...
@@ -27,7 +27,6 @@ class Game:
self
.
labyrinth
.
createThing
(
player
,
tile
)
self
.
players
.
append
(
player
)
self
.
sel
.
register
(
conn
,
selectors
.
EVENT_READ
,
player
.
read
)
self
.
showAdmins
()
def
removePlayer
(
self
,
player
):
assert
player
in
self
.
players
...
...
labyrinth.py
View file @
1ae6e89e
...
...
@@ -72,7 +72,7 @@ class Labyrinth:
result
=
""
for
row
in
self
.
tiles
:
for
field
in
row
:
if
field
.
groundtype
==
Labyrinth
.
GroundType
.
FLOOR
:
if
field
.
groundtype
==
Labyrinth
.
GroundType
.
WALL
:
result
+=
"#"
else
:
if
not
field
.
things
:
...
...
player.py
View file @
1ae6e89e
...
...
@@ -110,7 +110,7 @@ class Player(Thing):
elif
verb
in
sayVerbs
:
msg
=
" "
.
join
(
words
[
1
:])
for
dx
,
dy
in
directionOffsets
.
values
():
for
thing
in
self
.
field
.
neighbor
(
dx
=
dx
,
dy
=
dy
):
for
thing
in
self
.
field
.
neighbor
(
dx
=
dx
,
dy
=
dy
)
.
things
:
if
isinstance
(
thing
,
Player
)
and
thing
!=
self
:
thing
.
send
(
"You hear someone saying: "
+
msg
)
for
admin
in
self
.
game
.
admins
:
...
...
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