nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::Bot Class Reference

#include <bot.h>

Public Member Functions

 Bot (asio::io_context &io, asio::ssl::context &tls, uint32_t seed, bool udp, const Content &content, std::optional< Side > side=std::nullopt)
 Bot (const Bot &)=delete
Bot & operator= (const Bot &)=delete
void Start (const asio::ip::tcp::resolver::results_type &server, const std::string &token)
bool connected () const
const std::optional< protocol::Move > & move () const
 Where the bot's world told it to go, once it hands its players over.
void Leave ()
 Closes the connection, as a player who goes elsewhere does.
const std::vector< int64_t > & newest () const

Detailed Description

Definition at line 31 of file bot.h.

Constructor & Destructor Documentation

◆ Bot() [1/2]

nanommo::Bot::Bot ( asio::io_context & io,
asio::ssl::context & tls,
uint32_t seed,
bool udp,
const Content & content,
std::optional< Side > side = std::nullopt )

Finds the NPCs that talk through their kinds in the content, and what its items do through the items. A bot with a side is at war. Its seed picks the faction it swears to.

Definition at line 78 of file bot.cc.

◆ Bot() [2/2]

nanommo::Bot::Bot ( const Bot & )
delete

Member Function Documentation

◆ connected()

bool nanommo::Bot::connected ( ) const
inline

Definition at line 45 of file bot.h.

◆ Leave()

void nanommo::Bot::Leave ( )

Closes the connection, as a player who goes elsewhere does.

Definition at line 534 of file bot.cc.

◆ move()

const std::optional< protocol::Move > & nanommo::Bot::move ( ) const
inline

Where the bot's world told it to go, once it hands its players over.

Definition at line 48 of file bot.h.

◆ newest()

const std::vector< int64_t > & nanommo::Bot::newest ( ) const
inline

Definition at line 53 of file bot.h.

◆ operator=()

Bot & nanommo::Bot::operator= ( const Bot & )
delete

◆ Start()

void nanommo::Bot::Start ( const asio::ip::tcp::resolver::results_type & server,
const std::string & token )

Definition at line 91 of file bot.cc.


The documentation for this class was generated from the following files: