prepare gameserver implementation
This commit is contained in:
1 parent
b552ba0293
commit
20d64eebf9
4 files changed
+327
No files matched your search
@@ -89,10 +89,16 @@ private:
|
||||
class Brains {
|
||||
public:
|
||||
Brain &addNew();
|
||||
// Takes ownership of an already-constructed Brain (matches
|
||||
// GameServer.pas's Init(): a candidate TBrain gets built and validated
|
||||
// before deciding whether to Brains.Add() it or discard it).
|
||||
Brain &add(std::unique_ptr<Brain> brain);
|
||||
int count() const { return static_cast<int>(m_items.size()); }
|
||||
Brain &at(int index) const { return *m_items[static_cast<std::size_t>(index)]; }
|
||||
Brain &operator[](int index) const { return at(index); }
|
||||
void clear() { m_items.clear(); }
|
||||
// -1 if `brain` is null or not in this list (matches TList.IndexOf).
|
||||
int indexOf(const Brain *brain) const;
|
||||
|
||||
int kindCount(BrainType kind) const;
|
||||
std::vector<Brain *> getByKind(BrainType kind) const;
|
||||
|
||||
Reference in new issue
Block a user