fy"> {- gt; hitColor=Qt :: red; (gMode!=1)
{- gt; blackout (Qt :: black, Qt :: white, Qt :: red); - gt; blackout (Qt :: black, Qt :: white, Qt :: red) ; - gt; lColor=Qt :: white; - gt; lColor=Qt :: white; - gt; hitColor=Qt :: red;
}
{ gt; hitColor=Qt :: red;
}
(PF1- gt; move!=0)
{();
}
{();
}
(gMode!=1) QObject :: connect (PF2, SIGNAL (endFight ()), this, SLOT (won ())); QObject :: connect (EF, SIGNAL (endFight () ), this, SLOT (won ())); :: connect (PF1, SIGNAL (endFight ()), this, SLOT (lose ()));
}
MainWindow :: firePF1 ()
{(gMode!=1)
{- gt; setEnabled (false); - gt; setEnabled (true); str= Ходить гравець + PN1; :: information (this, Увага! raquo ;, str ); :: disconnect (PF1, SIGNAL (miss ()), this, SLOT (firePF1 ())); :: disconnect (PF1, SIGNAL (startFight ()), PF1, SLOT (fire ())); :: connect (PF2, SIGNAL (miss ()), this, SLOT (firePF2 ())); :: connect (PF2, SIGNAL (startFight ()), PF2, SLOT (fire ()));
}
{- gt; setEnabled (false); gt; setEnabled (true);
:: disconnect (PF1, SIGNAL (hit ()), PF1, SLOT (compFire ())); :: disconnect (PF1, SIGNAL (miss ()), this, SLOT (firePF1 ( ))); :: connect (EF, SIGNAL (miss ()), PF1, SLOT (compFire ())); :: connect (PF1, SIGNAL (comp ()), this, SLOT (firePF2 ())); :: connect (EF, SIGNAL (startFight ()), EF, SLOT (fire ()));
}
}
MainWindow :: firePF2 ()
{(gMode!=1)
{- gt; setEnabled (false); - gt; setEnabled (true); str= Ходить гравець + PN2; :: information (this, Увага! raquo ;, str );
:: disconnect (PF2, SIGNAL (miss ()), this, SLOT (firePF2 ())); :: disconnect (PF2, SIGNAL (startFight ()), PF2, SLOT (fire ( ))); :: connect (PF1, SIGNAL (startFight ()), PF1, SLOT (fire ())); :: connect (PF1, SIGNAL (miss ()), this, SLOT (firePF1 ()));
}
{- gt; setEnabled (true); gt; setEnabled (false);
:: disconnect (PF1, SIGNAL (comp ()), this, SLOT (firePF2 ())); :: disconnect (EF, SIGNAL (miss ()), PF1, SLOT (compFire ( ))); :: disconnect (EF, SIGNAL (startFight ()), EF, SLOT (fire ())); :: connect (PF1, SIGNAL (hit ()), PF1, SLOT (compFire ())); :: connect (PF1, SIGNAL (miss ()), this, SLOT (firePF1 ()));
}
}
MainWindow :: lose ()
{str= Виграв гравець + PN2; (gMode!=1) :: warning (NULL, Вніменіе raquo ;, str); :: warning (NULL, Вніменіе , tr ( Ви проиграли!raquo;));-gt;setEnabled(false);-gt;setEnabled(false);gt;setEnabled(false);
}
MainWindow :: won ()
{str= Виграв гравець + PN1; (gMode!=1) :: warning (NULL, Вніменіе raquo ;, str); :: warning (NULL, Вніменіе , tr ( Ви виграли! )); - gt; setEnabled (false); - gt; setEnabled (false); gt; setEnabled (false);
}
MainWindow :: checkRepeat (QVector lt; QString gt; a, QString name)
{stName, stCount, temp; i, j, count, len, n; fine=false; () lt; lt; a.size ();
/* for (i=0; i lt; a.size (); i ++)
{= a (i);=temp.length ();=0; (temp (j)!= - )
{= stName + temp (j); ++;
}=j; (j=n; j lt; len; j ++)=stCount + temp (j);=stCount.toInt (); (stName == name)
{++;=stName + - + QString :: number (count) ;. insert (i, stName);=true;
}
} (! fine)
{= name + - 1 raquo ;;. Append (stName);
} */
}
MainWindow :: startNewGame ()
{res=QMessageBox :: warning (this, Увага! raquo ;, tr ( Ви впевнені, що хочете почати нову гру? ), QMessageBox :: Yes, QMessageBox :: No);
(res == QMessageBox :: Yes)
{();= raquo ;; startNew ();
}
}
MainWindow :: quit ()
{res=QMessageBox :: warning (this, Увага! raquo ;, tr ( Ви впевнені, що хочете вийти? ), QMessageBox :: Yes, QMessageBox :: No) ;
(res == QMessageBox :: Yes)
{(gMode!=1)
{(PF1- gt; amount lt; 10 amp; amp; P...