From 65d7cf9e433562115616099f9c417adcd5e8e5b1 Mon Sep 17 00:00:00 2001
From: Erik Nygren <erik.nygren@sbb.ch>
Date: Wed, 1 May 2019 22:52:57 +0200
Subject: [PATCH] removed unused code snippet for curve detection

---
 flatland/envs/rail_env.py | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/flatland/envs/rail_env.py b/flatland/envs/rail_env.py
index eb8786c2..779ec058 100644
--- a/flatland/envs/rail_env.py
+++ b/flatland/envs/rail_env.py
@@ -367,18 +367,6 @@ class RailEnv(Environment):
                         #    (pos[0], pos[1], direction),
                         #    movement)
                         movement = curv_dir
-                        """
-                        reverse_direction = (direction + 2) % 4
-                        curv_dir = (movement + 1) % 4
-                        while not valid_transition:
-                            if curv_dir != reverse_direction:
-                                valid_transition = self.rail.get_transition(
-                                    (pos[0], pos[1], direction),
-                                    curv_dir)
-                            if valid_transition:
-                                movement = curv_dir
-                            curv_dir = (curv_dir + 1) % 4
-                        """
                 new_position = self._new_position(pos, movement)
                 # Is it a legal move?  1) transition allows the movement in the
                 # cell,  2) the new cell is not empty (case 0),  3) the cell is
-- 
GitLab