fix problem in generator.py
generate function return a dictionary to represent
the world