Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Flatland
Flatland
Commits
4a804ced
Commit
4a804ced
authored
Apr 26, 2019
by
spiglerg
Browse files
fixed set_transitions bug
parent
c69ceb5e
Pipeline
#384
passed with stage
in 2 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
flatland/core/transition_map.py
View file @
4a804ced
...
...
@@ -181,7 +181,9 @@ class GridTransitionMap(TransitionMap):
"""
if
len
(
cell_id
)
==
3
:
self
.
transitions
.
set_transitions
(
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]],
cell_id
[
2
],
new_transitions
)
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]]
=
self
.
transitions
.
set_transitions
(
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]],
cell_id
[
2
],
new_transitions
)
elif
len
(
cell_id
)
==
2
:
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]]
=
new_transitions
else
:
...
...
@@ -241,7 +243,10 @@ class GridTransitionMap(TransitionMap):
print
(
'GridTransitionMap.set_transition() ERROR:
\
wrong cell_id tuple.'
)
return
self
.
transitions
.
set_transition
(
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]],
cell_id
[
2
],
transition_index
,
new_transition
)
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]]
=
self
.
transitions
.
set_transition
(
self
.
grid
[
cell_id
[
0
]][
cell_id
[
1
]],
cell_id
[
2
],
transition_index
,
new_transition
)
def
save_transition_map
(
self
,
filename
):
"""
...
...
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