local MonkeyGames = LibStub("AceAddon-3.0"):GetAddon("MonkeyGames")

local AIManager = {}
MonkeyGames.AIManager = AIManager

function AIManager:RequestMove(gameState, gameDef, difficulty)
    local aiModule = gameDef.getAIFunc()
    if not aiModule then
        MonkeyGames:ErrorPrint("No AI module for " .. gameDef.name)
        return
    end

    local move = aiModule:GetBestMove(gameState, difficulty)
    if move then
        MonkeyGames.GameManager:MakeMove(move)
    else
        MonkeyGames:ErrorPrint("AI could not find a move")
    end
end
