QTfrontend/game.cpp
changeset 5201 7b9aa7aac336
parent 5140 932307228d05
child 5213 a86768368309
equal deleted inserted replaced
5200:7440fe992e73 5201:7b9aa7aac336
    17  */
    17  */
    18 
    18 
    19 #include <QString>
    19 #include <QString>
    20 #include <QByteArray>
    20 #include <QByteArray>
    21 #include <QUuid>
    21 #include <QUuid>
       
    22 #include <QColor>
    22 
    23 
    23 #include "game.h"
    24 #include "game.h"
    24 #include "hwconsts.h"
    25 #include "hwconsts.h"
    25 #include "gameuiconfig.h"
    26 #include "gameuiconfig.h"
    26 #include "gamecfgwidget.h"
    27 #include "gamecfgwidget.h"
   115     HWNamegen namegen;
   116     HWNamegen namegen;
   116 
   117 
   117     HWTeam * team1;
   118     HWTeam * team1;
   118     team1 = new HWTeam;
   119     team1 = new HWTeam;
   119     team1->difficulty = 0;
   120     team1->difficulty = 0;
   120     team1->teamColor = *colors[0];
   121     team1->teamColor = QColor(colors[0]);
   121     team1->numHedgehogs = 4;
   122     team1->numHedgehogs = 4;
   122     namegen.TeamRandomNames(team1,TRUE);
   123     namegen.TeamRandomNames(team1,TRUE);
   123     HWProto::addStringListToBuffer(teamscfg,
   124     HWProto::addStringListToBuffer(teamscfg,
   124             team1->TeamGameConfig(100));
   125             team1->TeamGameConfig(100));
   125 
   126 
   126     HWTeam * team2;
   127     HWTeam * team2;
   127     team2 = new HWTeam;
   128     team2 = new HWTeam;
   128     team2->difficulty = 4;
   129     team2->difficulty = 4;
   129     team2->teamColor = *colors[1];
   130     team2->teamColor = QColor(colors[1]);
   130     team2->numHedgehogs = 4;
   131     team2->numHedgehogs = 4;
   131 	do
   132 	do
   132         namegen.TeamRandomNames(team2,TRUE);
   133         namegen.TeamRandomNames(team2,TRUE);
   133 	while(!team2->TeamName.compare(team1->TeamName) || !team2->Hedgehogs[0].Hat.compare(team1->Hedgehogs[0].Hat));
   134 	while(!team2->TeamName.compare(team1->TeamName) || !team2->Hedgehogs[0].Hat.compare(team1->Hedgehogs[0].Hat));
   134     HWProto::addStringListToBuffer(teamscfg,
   135     HWProto::addStringListToBuffer(teamscfg,