# Routes
# This file defines all application routes (Higher priority routes first)
# https://www.playframework.com/documentation/latest/ScalaRouting
# ~~~~

# For the javascript routing
GET     /assets/js/routes           controllers.JavaScriptRoutingController.javascriptRoutes()
# Primary routes
GET     /                           controllers.MainMenuController.index()
GET     /assets/*file               controllers.Assets.versioned(path="/public", file: Asset)

# Main menu routes
GET     /mainmenu                   controllers.MainMenuController.mainMenu()
GET     /rules                      controllers.MainMenuController.rules()

POST    /createGame                 controllers.MainMenuController.createGame()
POST    /joinGame                   controllers.MainMenuController.joinGame()

# User authentication routes
GET     /login                      controllers.UserController.login()
POST    /login                      controllers.UserController.login_Post()

GET     /logout                     controllers.UserController.logout()

# In-game routes
GET    /game/:id                    controllers.IngameController.game(id: String)
GET    /game/:id/join               controllers.IngameController.joinGame(id: String)
GET    /game/:id/start              controllers.IngameController.startGame(id: String)
POST    /game/:id/kickPlayer         controllers.IngameController.kickPlayer(id: String, playerId: String)

POST    /game/:id/trump              controllers.IngameController.playTrump(id: String)
POST    /game/:id/tie                  controllers.IngameController.playTie(id: String)

GET     /game/:id/leaveGame         controllers.IngameController.leaveGame(id: String)
POST   /game/:id/playCard           controllers.IngameController.playCard(id: String)
# Polling
GET    /polling                    controllers.IngameController.polling(gameId: String)