Imam problema sa sledecom naredbom,koja uvijek daje isti rezultat "heurrez",pa sam posmislio da nije do naredbe break,koja se nalazi u ugnjezdenoj naredbi?
hvala
Code:
...
switch (vrsta[i][0]){
//ovde ubaciti switcheve za broj kuglica;
case first:{
System.out.println(" P R V I ");
switch(vrsta[i][1]){
case 4:{heurtemp=maxheur;break;}
case 3:{/*(-1+ig*2)*fak[ig+1]; se mnozilo sa prvim maxheur sabirkom*/
heurtemp=vr3*f;break;}
//imamo 3 kuglice.
case 2:{heurtemp=vr2;/*-3*/;brdvojki++;break;}
case 1:{heurtemp=vr1;/*-2*/;break;}
case 0:{heurtemp=vr0;/*-1*/;break;}
default:{heurtemp=0;break;}
}
//if(brdvojki>=2){heurtemp=(maxheur*(-1+ig*2))/*/2-1*ig*/;brdvojki=0;};
break;
}
case second:{
System.out.println(" D R U G I ");
switch(vrsta[i][1]){
case 4:{heurtemp=-maxheur;break;}
case 3:{heurtemp=-vr3;/*(maxheur*(-1+ig*2)*fak[ig+1]+maxheur*(-igr+2))-1*ig;*/break;}
case 2:{heurtemp=-vr2;brdvojki++;break;}
case 1:{heurtemp=-vr1;break;}
case 0:{heurtemp=-vr0;break;}
default:{heurtemp=0;break;}
}
//if(brdvojki>=2){heurtemp=(maxheur*(-1+ig*2))/*/2-1*ig*/;brdvojki=0;};
break;
}
case neutral:{
System.out.println(" N E U T R A L ");
heurtemp=0;break;}
/* ...ima josh koda ...nema vise ugnjezdenih switcheva */
}
...
...
switch (vrsta[i][0]){
//ovde ubaciti switcheve za broj kuglica;
case first:{
System.out.println(" P R V I ");
switch(vrsta[i][1]){
case 4:{heurtemp=maxheur;break;}
case 3:{/*(-1+ig*2)*fak[ig+1]; se mnozilo sa prvim maxheur sabirkom*/
heurtemp=vr3*f;break;}
//imamo 3 kuglice.
case 2:{heurtemp=vr2;/*-3*/;brdvojki++;break;}
case 1:{heurtemp=vr1;/*-2*/;break;}
case 0:{heurtemp=vr0;/*-1*/;break;}
default:{heurtemp=0;break;}
}
//if(brdvojki>=2){heurtemp=(maxheur*(-1+ig*2))/*/2-1*ig*/;brdvojki=0;};
break;
}
case second:{
System.out.println(" D R U G I ");
switch(vrsta[i][1]){
case 4:{heurtemp=-maxheur;break;}
case 3:{heurtemp=-vr3;/*(maxheur*(-1+ig*2)*fak[ig+1]+maxheur*(-igr+2))-1*ig;*/break;}
case 2:{heurtemp=-vr2;brdvojki++;break;}
case 1:{heurtemp=-vr1;break;}
case 0:{heurtemp=-vr0;break;}
default:{heurtemp=0;break;}
}
//if(brdvojki>=2){heurtemp=(maxheur*(-1+ig*2))/*/2-1*ig*/;brdvojki=0;};
break;
}
case neutral:{
System.out.println(" N E U T R A L ");
heurtemp=0;break;}
/* ...ima josh koda ...nema vise ugnjezdenih switcheva */
}
...
www.eden.rs
Izdavač duhovne i filozofske literature
Izdavač duhovne i filozofske literature