Class RunListScreen

java.lang.Object
javatro.display.screens.Screen
javatro.display.screens.RunListScreen

public class RunListScreen extends Screen
Represents the screen that displays the list of saved game runs.

This screen is responsible for:

  • Fetching the list of saved game runs from Storage
  • Dynamically generating menu options for each saved run
  • Providing a user interface for selecting a specific run to view

Extends Screen and overrides its display handling mechanism.

  • Constructor Details

    • RunListScreen

      public RunListScreen() throws JavatroException
      Constructs the RunListScreen by retrieving the saved runs from storage and creating corresponding ViewRunOption objects for each run.

      The options are then added to the command map for user interaction.

      Throws:
      JavatroException - if there is an error initializing the screen, such as issues with accessing the Storage instance or fetching run data.
  • Method Details

    • displayScreen

      public void displayScreen()
      Displays the list of saved runs on the screen.

      This method is responsible for rendering:

      • The screen title: "List of Saved Runs"
      • Menu options dynamically generated from saved run data

      Actual rendering of the menu options is handled by the superclass.

      Specified by:
      displayScreen in class Screen