rewrited the map generator.

use new hash method.