Extract terrain generation into Chunk class.