private String getOtherGroup ( Tile tile , Tile neighbor ) { final String group = mapGroup . getGroup ( tile ) ; for ( final Tile shared : getSharedNeigbors ( tile , neighbor ) ) { final String sharedNeighborGroup = mapGroup . getGroup ( shared ) ; if ( ! group . equals ( sharedNeighborGroup ) && ! isTransition ( shared ) ) { return sharedNeighborGroup ; } } return null ; }
Get the other transition group excluding the current group and transition itself .