Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

The World.from_dict class method was calling World.__init__ with only 2 of the 4 required positional arguments (name, size, seed, generation_params), causing instantiation to fail.

Changes

  • Updated World.from_dict to extract and pass seed and generation_params from the input dictionary
# Before
instance = World(in_dict["name"], Size(in_dict["width"], in_dict["height"]))

# After  
instance = World(
    in_dict["name"],
    Size(in_dict["width"], in_dict["height"]),
    in_dict["seed"],
    in_dict["generation_params"]
)

This matches the pattern used in _from_protobuf_world and ensures proper World object initialization from dictionary representations.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 17, 2025
Copilot AI changed the title [WIP] Add changes to address feedback on Major Infra Restructure PR Fix World.from_dict to pass required __init__ parameters Nov 17, 2025
Copilot AI requested a review from psi29a November 17, 2025 22:02
@psi29a psi29a changed the base branch from python314 to master November 17, 2025 22:16
@psi29a psi29a closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants