Map visibility updated to work with nxn map sizes.