Skip to content

Commit

Permalink
fix(controllers): add type parameters in constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-borriello00 committed Sep 7, 2023
1 parent 2ccf44e commit 33cf4c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/scala/scatan/controllers/game/SetUpController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import scatan.mvc.lib.Controller
import scatan.views.game.SetUpView
import scatan.mvc.lib.NavigableApplicationManager
import scatan.Pages
import scatan.model.ApplicationState

/** This is the controller for the setup page.
*/
Expand All @@ -20,7 +21,7 @@ trait SetUpController extends Controller:
* @param dependencies,
* the dependencies for the controller.
*/
class SetUpControllerImpl(dependencies: Controller.Requirements[SetUpView, ?]) extends SetUpController:
class SetUpControllerImpl(dependencies: Controller.Requirements[SetUpView, ApplicationState]) extends SetUpController:
override def goToHome(): Unit = NavigableApplicationManager.navigateTo(Pages.Home)
// TODO: implement goToPlay
override def goToPlay(): Unit = NavigableApplicationManager.navigateTo(Pages.Home)
3 changes: 2 additions & 1 deletion src/main/scala/scatan/controllers/home/HomeController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import scatan.views.home.HomeView
import scatan.Pages
import scatan.mvc.lib.application.NavigableApplication
import scatan.mvc.lib.NavigableApplicationManager
import scatan.model.ApplicationState

/** This is the controller for the home page.
*/
Expand All @@ -21,7 +22,7 @@ trait HomeController extends Controller:
* @param requirements,
* the requirements for the controller.
*/
class HomeControllerImpl(requirements: Controller.Requirements[HomeView, ?]) extends HomeController:
class HomeControllerImpl(requirements: Controller.Requirements[HomeView, ApplicationState]) extends HomeController:
override def goToSetup(): Unit =
NavigableApplicationManager.navigateTo[Pages](Pages.Setup)

Expand Down

0 comments on commit 33cf4c3

Please sign in to comment.