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
8f122295
Commit
8f122295
authored
May 01, 2019
by
hagrid67
Browse files
fixed lint
parent
55957edf
Pipeline
#476
passed with stage
in 2 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
flatland/utils/editor.py
View file @
8f122295
...
...
@@ -167,7 +167,7 @@ class JupEditor(object):
# get the direction index for the 2 transitions
liTrans
=
[]
for
rcTrans
in
rc2Trans
:
# gRCTrans - rcTrans gives an array of vector differences between our rcTrans
# gRCTrans - rcTrans gives an array of vector differences between our rcTrans
# and the 4 directions stored in gRCTrans.
# Where the vector difference is zero, we have a match...
# np.all detects where the whole row,col vector is zero.
...
...
@@ -177,10 +177,10 @@ class JupEditor(object):
iTrans
=
iTrans
[
0
][
0
]
liTrans
.
append
(
iTrans
)
# check that we have two transitions
# check that we have two transitions
if
len
(
liTrans
)
==
2
:
# Set the transition
env
.
rail
.
set_transition
((
*
rcMiddle
,
liTrans
[
0
]),
liTrans
[
1
],
Tr
ue
)
env
.
rail
.
set_transition
((
*
rcMiddle
,
liTrans
[
0
]),
liTrans
[
1
],
b
Tr
ansition
)
# iValCell = env.rail.transitions.set_transition(
# env.rail.grid[tuple(rcMiddle)], liTrans[0], liTrans[1], bTransition)
...
...
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