Guest User

Untitled

a guest
Feb 5th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.19 KB | Source Code | 0 0
  1. #include <QCoreApplication>
  2. #include "soldier.h"
  3. #include <QDebug>
  4. #include <QThread>
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8.     QCoreApplication a(argc, argv);
  9.  
  10.     Soldier soldier("private");
  11.     soldier.sayRank();
  12.     soldier.Fight();
  13.  
  14.     qDebug() << "";
  15.     QThread::msleep(1000);
  16.  
  17.     Archer archer("Lieutenant", 6);
  18.     archer.sayRank();
  19.     archer.Shoot();
  20.     qDebug() << "Oh darn. I ran out of arrows. Guess I will switch to melee combat now.";
  21.     archer.Fight();
  22.     qDebug() << "I should've stayed at range :/";
  23.     qDebug() << "";
  24.     QThread::msleep(1000);
  25.  
  26.     Horseman horseman("Sergeant", "Steve");
  27.     horseman.sayRank();
  28.     horseman.Trample();
  29.     horseman.Fight();
  30.     qDebug() << horseman.horse + ", run away from here and tell my wife I loved her!";
  31.     qDebug() << "";
  32.     QThread::msleep(1000);
  33.  
  34.     FROR fror ("General", 8, "Mejiro McQueen");
  35.     fror.sayRank();
  36.     fror.Charge();
  37.     fror.Trample();
  38.     fror.Shoot();
  39.     fror.Archer::Fight();
  40.     qDebug() << fror.horse + ", run! Run towards the future and become the idol you always deserved to be!";
  41.     qDebug() << "";
  42.  
  43.  
  44.     qDebug() << "Welp...";
  45.     QThread::msleep(1000);
  46.     qDebug() << "Everyone is dead now.\n";
  47.     QThread::msleep(1000);
  48.     qDebug() << "THE END";
  49.  
  50.     return a.exec();
  51. }
Advertisement
Add Comment
Please, Sign In to add comment