Made creating region code self explanatory

Created a function isRegion() which checks if the current location is a land region or a sea region bordering a land region, and restructured the construct region code so it reads well.