Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "gameselector.h"
- #include "ui_gameselector.h"
- gameselector::gameselector(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::gameselector)
- {
- ui->setupUi(this);
- }
- void gameselector::f_proposer()
- {
- ui->verdict->clear();
- int valeurProposee = 0;
- smap[0]="beavercreek";
- smap[1]="bloodgulch";
- smap[2]="carousel";
- smap[3]="chillout";
- smap[4]="damnation";
- smap[5]="hangemhigh";
- smap[6]="longest";
- smap[7]="prisoner";
- smap[8]="ratrace";
- smap[9]="wizard";
- sgt[0]="ltd2_slayer";
- sgt[1]="ltd2_teamslayer";
- unsigned int a=5,b=3,m=8;
- unsigned int nombre = time(0);
- QString aAfficher;
- QTextStream out(&aAfficher);
- valeurProposee = ui->proposition->value();
- for(int i=0;i<valeurProposee;i++){
- nombre = (a*nombre+ b) % m;
- tabgt[i] = rand()%2;
- out<<"sv_mapcycle_add "<<smap[nombre]<<" \""<<sgt[tabgt[i]]<<"\""<<endl;
- }
- ui->verdict->append(aAfficher);
- }
- gameselector::~gameselector()
- {
- delete ui;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement