MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / createAI

Function createAI

source/ai/AIFactory.cpp:26–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace AIFactory
25{
26BaseAI* createAI(GameMap& gameMap, Player& player, KeeperAIType type)
27{
28 switch(type)
29 {
30 case KeeperAIType::easy:
31 return new KeeperAI(gameMap, player, 30, 50, 30, 50, 60, 80);
32 case KeeperAIType::normal:
33 return new KeeperAI(gameMap, player, 0, 5, 0, 5, 30, 50);
34 default:
35 break;
36 }
37 OD_LOG_ERR("Asked wrong AI type=" + KeeperAITypes::toString(type));
38 return nullptr;
39}
40} // namespace AIFactory

Callers 1

assignAIMethod · 0.85

Calls 1

toStringFunction · 0.50

Tested by

no test coverage detected