preliminary AlwaysRevealTopCard support related to issue #31, server code cleanup (finally removed getGameState)

This commit is contained in:
Max-Wilhelm Bruker 2012-03-31 21:47:30 +02:00
parent 75bac4a5b9
commit 7417236c3a
28 changed files with 329 additions and 184 deletions

20
common/server_counter.cpp Normal file
View file

@ -0,0 +1,20 @@
#include "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);
}