mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
* Move tabs to interface/widgets. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
20 lines
838 B
C++
20 lines
838 B
C++
#include "game.h"
|
|
|
|
#include "../interface/widgets/tabs/tab_game.h"
|
|
|
|
#include <libcockatrice/protocol/pb/event_game_joined.pb.h>
|
|
|
|
Game::Game(TabGame *_tab,
|
|
QList<AbstractClient *> &_clients,
|
|
const Event_GameJoined &event,
|
|
const QMap<int, QString> &_roomGameTypes)
|
|
: AbstractGame(_tab)
|
|
{
|
|
gameMetaInfo->setFromProto(event.game_info());
|
|
gameMetaInfo->setRoomGameTypes(_roomGameTypes);
|
|
gameState = new GameState(this, 0, event.host_id(), tab->getTabSupervisor()->getIsLocalGame(), _clients, false,
|
|
event.resuming(), -1, false);
|
|
connect(gameMetaInfo, &GameMetaInfo::startedChanged, gameState, &GameState::onStartedChanged);
|
|
playerManager = new PlayerManager(this, event.player_id(), event.judge(), event.spectator());
|
|
gameMetaInfo->setStarted(false);
|
|
}
|