Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ahmad Reza Cheraghi
swarm-sim
Commits
a1e1bcb9
Commit
a1e1bcb9
authored
May 17, 2019
by
Ahmad Reza Cheraghi
Browse files
Update particle.py
parent
8057741e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/particle.py
View file @
a1e1bcb9
...
...
@@ -271,7 +271,13 @@ class Particle(matter.Matter):
if
self
.
sim
.
get_coords_in_dir
(
self
.
coords
,
dir
)
in
self
.
sim
.
get_location_map_coords
():
return
self
.
sim
.
get_location_map_coords
()[
self
.
sim
.
get_coords_in_dir
(
self
.
coords
,
dir
)]
def
get_location
(
self
):
if
self
.
coords
in
self
.
sim
.
location_map_coords
:
return
self
.
sim
.
get_location_map_coords
()[
self
.
coords
]
def
get_tile
(
self
):
if
self
.
self
.
coords
in
self
.
sim
.
get_tile_map_coords
():
return
self
.
sim
.
get_tile_map_coords
()[
self
.
coords
]
def
write_to_with
(
self
,
matter
,
key
=
None
,
data
=
None
):
...
...
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