Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
Haxotel
Commits
1ae6e89e
Commit
1ae6e89e
authored
Aug 01, 2014
by
Ralf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bunch of small fixes
parent
45beb26f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
game.py
game.py
+0
-1
labyrinth.py
labyrinth.py
+1
-1
player.py
player.py
+1
-1
No files found.
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