private static void checkTransition ( Map < Transition , Collection < TileRef > > transitions , MapTransitionExtractor extractor , Tile tile ) { final Transition transition = extractor . getTransition ( tile ) ; if ( transition != null ) { getTiles ( transitions , transition ) . add ( new TileRef ( tile ) ) ; final Transition symetric = new Transition ( transition . getType ( ) . getSymetric ( ) , transition . getOut ( ) , transition . getIn ( ) ) ; getTiles ( transitions , symetric ) . add ( new TileRef ( tile ) ) ; } }
Check the tile transition and add it to transitions collection if valid .