code: public Transition getTransition(Tile tile)
      {
          final Collection<String> neighborGroups = getNeighborGroups(tile);
          final Collection<String> groups = new HashSet<>(neighborGroups);
  
          final Transition transition;
          if (groups.size() == 1 && mapGroup.getGroup(tile).equals(groups.iterator().next()))
          {
              transition = getTransitionSingleGroup(groups);
          }
          else if (groups.size() == 2 && neighborGroups.size() == TransitionType.BITS && isTransition(tile))
          {
              transition = getTransitionTwoGroups(neighborGroups);
          }
          else
          {
              transition = null;
          }
  
          return transition;
      }
docs: Get the tile transition.
  
  @param tile The current tile.
  @return The tile transition, <code>null</code> if none.