feat: true-microservices (#40)

Reviewed-on: #40
This commit is contained in:
2026-04-29 22:06:01 +02:00
parent 67511fc649
commit 590924254e
328 changed files with 10672 additions and 2939 deletions
@@ -0,0 +1,20 @@
package de.nowchess.bot
import de.nowchess.bot.bots.ClassicalBot
import jakarta.enterprise.context.ApplicationScoped
object BotController:
private val bots: Map[String, Bot] = Map(
"easy" -> ClassicalBot(BotDifficulty.Easy),
"medium" -> ClassicalBot(BotDifficulty.Medium),
"hard" -> ClassicalBot(BotDifficulty.Hard),
"expert" -> ClassicalBot(BotDifficulty.Expert),
)
def getBot(name: String): Option[Bot] = bots.get(name.toLowerCase)
def listBots: List[String] = bots.keys.toList.sorted
@ApplicationScoped
class BotController:
def getBot(name: String): Option[Bot] = BotController.getBot(name)
def listBots: List[String] = BotController.listBots