Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort exists for printing #195

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/quantum_rpg/main_loop_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def test_main_begin():

A bent sign sticks out of the ground at an angle.

Exits: south, north.
Exits: north, south.

"""
)
Expand All @@ -622,7 +622,7 @@ def test_main_load():
by some mirage. To proceed, you will need to move around this strange
occurance.

Exits: south, east, west.
Exits: east, south, west.

"""
)
Expand Down Expand Up @@ -655,7 +655,7 @@ def test_main_bad_save_file():
by some mirage. To proceed, you will need to move around this strange
occurance.

Exits: south, east, west.
Exits: east, south, west.

"""
)
2 changes: 1 addition & 1 deletion examples/quantum_rpg/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Location:
items: Optional[List[item.Item]] = None

def _exits(self) -> str:
return ", ".join([ex.value for ex in self.exits]) + "."
return ", ".join(sorted(ex.value for ex in self.exits)) + "."

def _item_str(self) -> str:
if not self.items:
Expand Down
Loading