clplaner.c
changeset 78 e87e0fe4a7db
parent 77 49e0babccb23
equal deleted inserted replaced
77:49e0babccb23 78:e87e0fe4a7db
   105 void shakeTeamIdx (int *first_idx, int *second_idx, int teams)
   105 void shakeTeamIdx (int *first_idx, int *second_idx, int teams)
   106 {
   106 {
   107     int i, j, k;
   107     int i, j, k;
   108 
   108 
   109     /*
   109     /*
       
   110      * Who wins the Title?
       
   111      */
       
   112     if (teams == 1)
       
   113         return;
       
   114 
       
   115     /*
   110      * swap the index MAXLOOP times...
   116      * swap the index MAXLOOP times...
   111      */
   117      */
   112     for (i = 0; i < MAXLOOP; i++) {
   118     for (i = 0; i < MAXLOOP; i++) {
   113         for (j = 0; j < teams; j++) {
   119         for (j = 0; j < teams; j++) {
   114             k = getrandom (teams - 1);
   120             k = getrandom (teams - 1);