completed basic diamond-square algorithm