Skip to content

Pygame status panel omits the location and goal rows the console and web front-ends show #119

Description

@dmccoystephenson

Problem

The pygame status panel is missing two rows the other two front-ends both show, and formats money differently.

FishE.play sets userInterface.currentLocationName and userInterface.goalProgress before every render (src/fishE.py:188-192), and BaseUserInterface documents them as "header fields the game loop sets before each render" (src/ui/baseUserInterface.py:23). Two front-ends use them; pygame ignores both:

Field Console (userInterface.py:40-52) Web (webUserInterface.py:122-123) Pygame (_statusLines, pygameUserInterface.py:141-150)
Location `" Location: " + ...` if (h.location) addPart(h.location)
Goal progress `" Goal: " + ...` if (h.goal) addPart(...)
Money `" Money: $%.2f"` `$${h.money.toFixed(2)}`

Consequences in the pygame front-end:

  • A player can't see which of the five locations they're in, and there's no on-screen progress toward the $10,000 goal that README.md describes as "shown in the status header".
  • Money renders raw. Player.moneyInBank starts at 0.01 and bank withdrawals move fractional amounts into money, so the panel can show a full float (e.g. Money: $20.010000000000002) where the other two front-ends show $20.01.

Expected

_statusLines() includes the location and goal rows when those header fields are non-empty (both front-ends already treat empty as "hide the row"), and formats money to two decimal places — matching the console's row order: Day, Location, Time, Money, Fish, Energy, [OPERATOR MODE], Goal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions