Coverage report for ai


src/
File: src/run/patterns/TestPattern.cpp
Date: 2024-06-25 10:57:00
Lines:
0/16
0.0%
Functions:
0/6
0.0%
Branches:
0/16
0.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** zappy/ai
4 ** File description:
5 ** TestPattern.cpp
6 */
7
8 #include "../../bots/ABotPattern.hpp"
9 #include <functional>
10
11 void ABotPattern::testPatern()
12 {
13 queue.push_back({[&]()
14 { doAction(LOOK, ""); }, "LOOK"});
15 queue.push_back({[&]()
16 { doAction(FORWARD, ""); }, "FORWARD"});
17 queue.push_back({[&]()
18 { doAction(TAKE, "food"); }, "TAKE"});
19 queue.push_back({[&]()
20 { doAction(RIGHT, ""); }, "RIGHT"});
21 }
22
23 void ABotPattern::trapMessage()
24 {
25 std::string trapMessage = replaceNumbersInString(_enemyMessage.content, 1200);
26 if (trapMessage.empty())
27 trapMessage = _enemyMessage.content;
28 std::cout << "trapMessage: " << trapMessage << std::endl;
29 addBroadcastAction(trapMessage);
30 }
31