mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 15:02:16 -07:00
Turn things in common into separate libs.
Took 2 hours 27 minutes
This commit is contained in:
parent
53d80efab8
commit
01378b8314
389 changed files with 336 additions and 233 deletions
17
libs/server/src/game/server_counter.cpp
Normal file
17
libs/server/src/game/server_counter.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "../../include/game/server_counter.h"
|
||||
|
||||
#include "pb/serverinfo_counter.pb.h"
|
||||
|
||||
Server_Counter::Server_Counter(int _id, const QString &_name, const color &_counterColor, int _radius, int _count)
|
||||
: id(_id), name(_name), counterColor(_counterColor), radius(_radius), count(_count)
|
||||
{
|
||||
}
|
||||
|
||||
void Server_Counter::getInfo(ServerInfo_Counter *info)
|
||||
{
|
||||
info->set_id(id);
|
||||
info->set_name(name.toStdString());
|
||||
info->mutable_counter_color()->CopyFrom(counterColor);
|
||||
info->set_radius(radius);
|
||||
info->set_count(count);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue