Refactored code for Map class.
Fixed errors so the game now works.
Improved logic for detecting if a portal can be placed at current location.