Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sfwatergit
Flatland
Commits
8f122295
Commit
8f122295
authored
5 years ago
by
hagrid67
Browse files
Options
Downloads
Patches
Plain Diff
fixed lint
parent
55957edf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
flatland/utils/editor.py
+3
-3
3 additions, 3 deletions
flatland/utils/editor.py
with
3 additions
and
3 deletions
flatland/utils/editor.py
+
3
−
3
View file @
8f122295
...
@@ -167,7 +167,7 @@ class JupEditor(object):
...
@@ -167,7 +167,7 @@ class JupEditor(object):
# get the direction index for the 2 transitions
# get the direction index for the 2 transitions
liTrans
=
[]
liTrans
=
[]
for
rcTrans
in
rc2Trans
:
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.
# and the 4 directions stored in gRCTrans.
# Where the vector difference is zero, we have a match...
# Where the vector difference is zero, we have a match...
# np.all detects where the whole row,col vector is zero.
# np.all detects where the whole row,col vector is zero.
...
@@ -177,10 +177,10 @@ class JupEditor(object):
...
@@ -177,10 +177,10 @@ class JupEditor(object):
iTrans
=
iTrans
[
0
][
0
]
iTrans
=
iTrans
[
0
][
0
]
liTrans
.
append
(
iTrans
)
liTrans
.
append
(
iTrans
)
# check that we have two transitions
# check that we have two transitions
if
len
(
liTrans
)
==
2
:
if
len
(
liTrans
)
==
2
:
# Set the transition
# 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(
# iValCell = env.rail.transitions.set_transition(
# env.rail.grid[tuple(rcMiddle)], liTrans[0], liTrans[1], bTransition)
# env.rail.grid[tuple(rcMiddle)], liTrans[0], liTrans[1], bTransition)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment