Added generate map from array, fixed movement check