~ubuntu-branches/ubuntu/gutsy/qgo/gutsy

« back to all changes in this revision

Viewing changes to src/mainwin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Chaboisseau
  • Date: 2007-01-05 05:49:36 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070105054936-iu9nhzlapincf3zc
Tags: 1.5.3-1
New upstream release (closes: #405259)

Show diffs side-by-side

added added

removed removed

Lines of Context:
972
972
//                                      if (setting->readBoolEntry("USE_NMATCH"))
973
973
//                                      {
974
974
// we wanted to allow user to disable 'nmatch', but IGS disables 'seek' with nmatch
975
 
                                                sendcommand("toggle nmatch");
 
975
                                        set_sessionparameter("nmatch",true);
976
976
 
977
977
                                                //temporaary settings to prevent use of Koryo BY on IGS (as opposed to canadian)
978
 
                                                sendcommand("nmatchrange BWN 0-9 19-19 60-60 60-3600 25-25 0 0 0-0",false);
 
978
                                                //sendcommand("nmatchrange BWN 0-9 19-19 60-60 60-3600 25-25 0 0 0-0",false);
 
979
                                        send_nmatch_range_parameters();
979
980
//                                      }
980
981
                                        sendcommand("toggle newundo");
981
982
                                        sendcommand("toggle seek");
3264
3265
 
3265
3266
        slot_message(player.leftJustify(15,' ',true) + Rk.rightJustify(5) +  " : " + condition);
3266
3267
}
 
3268
 
 
3269
/*
 
3270
* on IGS, sends the 'nmatch'time, BY, handicap ranges
 
3271
* command syntax : "nmatchrange         BWN     0-9 19-19        60-60          60-3600         25-25           0 0 0-0"
 
3272
*                               (B/W/ nigiri)   Hcp Sz     Main time (secs)     BY time (secs)  BY stones       Koryo time
 
3273
*/
 
3274
void ClientWindow::send_nmatch_range_parameters()
 
3275
{
 
3276
        
 
3277
        if ((myAccount->get_gsname() != IGS) || (myAccount->get_status() == OFFLINE))
 
3278
                return ;
 
3279
 
 
3280
        QString c = "nmatchrange ";
 
3281
        c.append(setting->readBoolEntry("NMATCH_BLACK") ? "B" : "");
 
3282
        c.append(setting->readBoolEntry("NMATCH_WHITE") ? "W" : "");
 
3283
        c.append(setting->readBoolEntry("NMATCH_NIGIRI") ? "N" : "");
 
3284
        c.append(" 0-");
 
3285
        c.append(QString::number(setting->readIntEntry("NMATCH_HANDICAP")));
 
3286
        c.append(" ");
 
3287
        c.append(QString::number(setting->readIntEntry("DEFAULT_SIZE")));
 
3288
        c.append("-19 ");
 
3289
        c.append(QString::number(setting->readIntEntry("DEFAULT_TIME")*60));
 
3290
        c.append("-");
 
3291
        c.append(QString::number(setting->readIntEntry("NMATCH_MAIN_TIME")*60));
 
3292
        c.append(" ");
 
3293
        c.append(QString::number(setting->readIntEntry("DEFAULT_BY")*60));
 
3294
        c.append("-");
 
3295
        c.append(QString::number(setting->readIntEntry("NMATCH_BYO_TIME")*60));
 
3296
        c.append(" 25-25 0 0 0-0");
 
3297
        
 
3298
        sendcommand(c, true);
 
3299
}
 
 
b'\\ No newline at end of file'