| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | ** EPITECH PROJECT, 2024 | ||
| 3 | ** zappy/ai | ||
| 4 | ** File description: | ||
| 5 | ** ListenFirstResponse.cpp | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include "../../client/Client.hpp" | ||
| 9 | |||
| 10 | // TODO: use it ? | ||
| 11 | ✗ | void Client::listenFirstResponse(const std::string &response) | |
| 12 | { | ||
| 13 | ✗ | int slot; | |
| 14 | ✗ | unsigned int x; | |
| 15 | ✗ | unsigned int y; | |
| 16 | |||
| 17 | ✗ | std::string modifiedInput = response; | |
| 18 | std::replace(modifiedInput.begin(), modifiedInput.end(), '\n', ' '); | ||
| 19 | ✗ | std::istringstream iss(modifiedInput); | |
| 20 | ✗ | iss >> slot >> x >> y; | |
| 21 | |||
| 22 | ✗ | _slot = slot; | |
| 23 | ✗ | _width = x; | |
| 24 | ✗ | _height = y; | |
| 25 | ✗ | } | |
| 26 |