equal
deleted
inserted
replaced
33 |
33 |
34 #include <QMessageBox> |
34 #include <QMessageBox> |
35 #include "netclient.h" |
35 #include "netclient.h" |
36 #include "game.h" |
36 #include "game.h" |
37 |
37 |
38 HWNet::HWNet(GameConfig * config) |
38 HWNet::HWNet(GameUIConfig * config) |
39 : QObject() |
39 : QObject() |
40 { |
40 { |
41 this->config = config; |
41 this->config = config; |
42 state = nsDisconnected; |
42 state = nsDisconnected; |
43 IRCmsg_cmd_text = new QRegExp("^[A-Z]+ :.+$"); |
43 IRCmsg_cmd_text = new QRegExp("^[A-Z]+ :.+$"); |
490 hwp_chanmsg(mynick, msg); |
490 hwp_chanmsg(mynick, msg); |
491 } |
491 } |
492 |
492 |
493 void HWNet::RunGame(const QString & seed) |
493 void HWNet::RunGame(const QString & seed) |
494 { |
494 { |
495 HWGame * game = new HWGame(config); |
495 HWGame * game = new HWGame(config, 0); |
496 connect(game, SIGNAL(SendNet(const QByteArray &)), this, SLOT(SendNet(const QByteArray &))); |
496 connect(game, SIGNAL(SendNet(const QByteArray &)), this, SLOT(SendNet(const QByteArray &))); |
497 connect(this, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &))); |
497 connect(this, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &))); |
498 connect(this, SIGNAL(LocalCFG(const QString &)), game, SLOT(LocalCFG(const QString &))); |
498 connect(this, SIGNAL(LocalCFG(const QString &)), game, SLOT(LocalCFG(const QString &))); |
499 game->StartNet(seed); |
499 game->StartNet(seed); |
500 } |
500 } |