diff --git a/knockoutwhistweb/app/components/WebApplicationConfiguration.scala b/knockoutwhistweb/app/components/WebApplicationConfiguration.scala new file mode 100644 index 0000000..5124c2b --- /dev/null +++ b/knockoutwhistweb/app/components/WebApplicationConfiguration.scala @@ -0,0 +1,9 @@ +package components + +import de.knockoutwhist.components.DefaultConfiguration + +class WebApplicationConfiguration extends DefaultConfiguration { + + + +} diff --git a/knockoutwhistweb/app/controllers/HomeController.scala b/knockoutwhistweb/app/controllers/HomeController.scala index 883c557..3fa3357 100644 --- a/knockoutwhistweb/app/controllers/HomeController.scala +++ b/knockoutwhistweb/app/controllers/HomeController.scala @@ -21,14 +21,21 @@ class HomeController @Inject()(val controllerComponents: ControllerComponents) e * will be called when the application receives a `GET` request with * a path of `/`. */ - def index() = { + def index(): Action[AnyContent] = { if (!initial) { initial = true KnockOutWhist.main(new Array[String](_length = 0)) } Action { implicit request: Request[AnyContent] => { - Ok(views.html.main.render("KnockoutWhist", views.html.index.apply())) + Ok(views.html.main.apply("KnockoutWhist")(views.html.)) } } } + + def ingame(): Action[AnyContent] = { + Action { implicit request: Request[AnyContent] => { + Ok(views.html.tui.apply()) + } + } + } \ No newline at end of file diff --git a/knockoutwhistweb/app/controllers/WebUI.scala b/knockoutwhistweb/app/controllers/WebUI.scala new file mode 100644 index 0000000..9103001 --- /dev/null +++ b/knockoutwhistweb/app/controllers/WebUI.scala @@ -0,0 +1,12 @@ +package controllers + +import de.knockoutwhist.ui.UI + +object WebUI extends UI { + + override def initial: Boolean = true + + + + +} diff --git a/knockoutwhistweb/app/views/index.scala.html b/knockoutwhistweb/app/views/index.scala.html index 68d37fb..1f2e671 100644 --- a/knockoutwhistweb/app/views/index.scala.html +++ b/knockoutwhistweb/app/views/index.scala.html @@ -1,4 +1,4 @@ -@() +@(output: String) @main("Welcome to Play") {