introduced viewport. moved rotation logic from map to viewport, keeping the structure of the map array static