QTfrontend/frameTeam.cpp
changeset 150 d9e8a336195c
parent 140 50ccde437ea1
child 153 dc10da2a73f9
equal deleted inserted replaced
149:aae256899c49 150:d9e8a336195c
     5 #include <QCoreApplication>
     5 #include <QCoreApplication>
     6 
     6 
     7 using namespace std;
     7 using namespace std;
     8 
     8 
     9 FrameTeams::FrameTeams(QWidget* parent) :
     9 FrameTeams::FrameTeams(QWidget* parent) :
    10   QWidget(parent), mainLayout(this)
    10   QWidget(parent), maxHedgehogsPerGame(18), mainLayout(this)
    11 {
    11 {
    12   mainLayout.setSpacing(1);
    12   mainLayout.setSpacing(1);
    13 }
    13 }
    14 
    14 
    15 void FrameTeams::addTeam(HWTeam team, bool willPlay)
    15 void FrameTeams::addTeam(HWTeam team, bool willPlay)
    34 {
    34 {
    35   tmapTeamToWidget::iterator it=teamToWidget.find(team);
    35   tmapTeamToWidget::iterator it=teamToWidget.find(team);
    36   QWidget* ret = it!=teamToWidget.end() ? it->second : 0;
    36   QWidget* ret = it!=teamToWidget.end() ? it->second : 0;
    37   return ret;
    37   return ret;
    38 }
    38 }
       
    39 
       
    40 bool FrameTeams::isFullTeams() const
       
    41 {
       
    42   return overallHedgehogs==maxHedgehogsPerGame;
       
    43 }