| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** zappy/ai/BotFactory | ||
| 4 | ** File description: | ||
| 5 | ** BotFactory.cpp | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include "BotFactory.hpp" | ||
| 9 | |||
| 10 | ✗ | std::unique_ptr<IBot> BotFactory::createBot(const std::string &type) | |
| 11 | { | ||
| 12 | ✗ | if (type == "Forker") | |
| 13 | { | ||
| 14 | ✗ | return std::make_unique<Forker>(); | |
| 15 | } | ||
| 16 | ✗ | if (type == "SimpleBot") | |
| 17 | { | ||
| 18 | ✗ | return std::make_unique<SimpleBot>(); | |
| 19 | } | ||
| 20 | |||
| 21 | return nullptr; | ||
| 22 | } | ||
| 23 |