Skip to content

Commit

Permalink
Inherit from abstract Controller
Browse files Browse the repository at this point in the history
The UI now expects an instance of a Controller, which is an abstract
base class. Our old Controller class has been renamed to ModOrganizer,
and it now also inherits from Controller.

This will allow us to define an interface that all of ModOrganizer, the
UI, and a yet-to-come FomodController can agree on.
  • Loading branch information
cyberrumor committed Oct 30, 2023
1 parent 3fc087d commit 47b6ed5
Show file tree
Hide file tree
Showing 5 changed files with 1,116 additions and 1,100 deletions.
4 changes: 2 additions & 2 deletions ammo/ammo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from pathlib import Path
from .ui import UI
from .controller import Controller
from .mod_organizer import ModOrganizer
from .game import Game

IDS = {
Expand Down Expand Up @@ -83,7 +83,7 @@ def main():
)

# Create an instance of the controller.
controller = Controller(DOWNLOADS, game)
controller = ModOrganizer(DOWNLOADS, game)

# Run the UI against the controller.
ui = UI(controller)
Expand Down
Loading

0 comments on commit 47b6ed5

Please sign in to comment.