From 33cf4c3a3f5cc9449c63ba708c0307d6e63c10cb Mon Sep 17 00:00:00 2001 From: luigi-borriello00 Date: Thu, 7 Sep 2023 11:25:00 +0200 Subject: [PATCH] fix(controllers): add type parameters in constructors --- src/main/scala/scatan/controllers/game/SetUpController.scala | 3 ++- src/main/scala/scatan/controllers/home/HomeController.scala | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/scatan/controllers/game/SetUpController.scala b/src/main/scala/scatan/controllers/game/SetUpController.scala index 77edc374..9ecbbf19 100644 --- a/src/main/scala/scatan/controllers/game/SetUpController.scala +++ b/src/main/scala/scatan/controllers/game/SetUpController.scala @@ -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. */ @@ -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) diff --git a/src/main/scala/scatan/controllers/home/HomeController.scala b/src/main/scala/scatan/controllers/home/HomeController.scala index 50a1a708..6521cf4e 100644 --- a/src/main/scala/scatan/controllers/home/HomeController.scala +++ b/src/main/scala/scatan/controllers/home/HomeController.scala @@ -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. */ @@ -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)