QTfrontend/net/newnetclient.cpp
changeset 8416 e691acd778f5
parent 8401 87410ae372f6
child 8436 b89aacebb9db
equal deleted inserted replaced
8415:02acf6b92f52 8416:e691acd778f5
   931 void HWNewNet::consoleCommand(const QString & cmd)
   931 void HWNewNet::consoleCommand(const QString & cmd)
   932 {
   932 {
   933     RawSendNet(QString("CMD%1%2").arg(delimeter).arg(cmd));
   933     RawSendNet(QString("CMD%1%2").arg(delimeter).arg(cmd));
   934 }
   934 }
   935 
   935 
       
   936 bool HWNewNet::allPlayersReady()
       
   937 {
       
   938     int ready = 0;
       
   939     for (int i = 0; i < m_roomPlayersModel->rowCount(); i++)
       
   940         if (m_roomPlayersModel->index(i, 0).data(PlayersListModel::Ready).toBool()) ready++;
       
   941 
       
   942     return (ready == m_roomPlayersModel->rowCount());
       
   943 }
       
   944 
   936 void HWNewNet::startGame()
   945 void HWNewNet::startGame()
   937 {
   946 {
   938     RawSendNet(QString("START_GAME"));
   947     RawSendNet(QString("START_GAME"));
   939 }
   948 }
   940 
   949