|
Zappy Server
C++ game server: world, rules, scheduler, network
|
Parses a raw AI client line into a typed Ai::Command. More...
#include <AiParser.hpp>
Collaboration diagram for AiParser:Static Public Member Functions | |
| static std::optional< Ai::Command > | parse (std::string_view line) |
| Parse one line from an AI client (no trailing newline). | |
Parses a raw AI client line into a typed Ai::Command.
Strict and case-sensitive. Returns nullopt on unknown or malformed input. The caller (CommandDispatcher) handles sending "ko\n" back to the client.
Definition at line 52 of file AiParser.hpp.
|
static |
Parse one line from an AI client (no trailing newline).
Definition at line 3 of file AiParser.cpp.
References Resources::fromName(), and res().
Referenced by CommandDispatcher::_dispatchAi().
Here is the call graph for this function:
Here is the caller graph for this function: