mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
initial commit
This commit is contained in:
commit
a11f93df4d
99 changed files with 7493 additions and 0 deletions
20
servatrice/src/testservergamethread.cpp
Normal file
20
servatrice/src/testservergamethread.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "testservergamethread.h"
|
||||
|
||||
TestServerGameThread::TestServerGameThread(const QString _name, const QString _description, const QString _password, const int _maxPlayers, TestServerSocket *_creator, QObject *parent)
|
||||
: QThread(parent), name(_name), description(_description), password(_password), maxPlayers(_maxPlayers), creator(_creator), game(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
TestServerGameThread::~TestServerGameThread()
|
||||
{
|
||||
if (game)
|
||||
delete game;
|
||||
}
|
||||
|
||||
void TestServerGameThread::run()
|
||||
{
|
||||
game = new TestServerGame(name, description, password, maxPlayers);
|
||||
emit gameCreated(game, creator);
|
||||
exec();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue