Dec 21, 2014 at 4:32am UTC
i have all the variables initialized and every something that's going wrong is that once planetN goes through the switch case when i try to run planetN again through the switch case with another value the variables fuel1 through fuel15 won't change to the appropriate values
void Fuelchange()
{
switch (planetN)
{
case 1: //this is earth
{
fuel1 = 0; //here
fuel2 = 100;
fuel3 = 200;
fuel4 = 300;
fuel5 = 400;
fuel6 = 750;
fuel7 = 1000;
fuel8 = 1500;
fuel9 = 2500;
fuel10 = 5000;
fuel11 = 7500;
fuel12 = 12000;
fuel13 = 15000;
fuel14 = 30000;
fuel15 = 50000;
break;
}
case 2: //this is mars
{
fuel1 = 100;
fuel2 = 0; //here
fuel3 = 100;
fuel4 = 200;
fuel5 = 300;
fuel6 = 650;
fuel7 = 900;
fuel8 = 1400;
fuel9 = 2400;
fuel10 = 4900;
fuel11 = 7400;
fuel12 = 11900;
fuel13 = 14900;
fuel14 = 29900;
fuel15 = 49900;
break;
}
case 3: //this is jupiter
{
fuel1 = 200;
fuel2 = 100;
fuel3 = 0; //here
fuel4 = 100;
fuel5 = 200;
fuel6 = 550;
fuel7 = 800;
fuel8 = 1300;
fuel9 = 2300;
fuel10 = 4800;
fuel11 = 7300;
fuel12 = 11800;
fuel13 = 14800;
fuel14 = 29800;
fuel15 = 49800;
break;
}
case 4: //this is saturn
{
fuel1 = 300;
fuel2 = 200;
fuel3 = 100;
fuel4 = 0; //here
fuel5 = 100;
fuel6 = 450;
fuel7 = 700;
fuel8 = 1200;
fuel9 = 2200;
fuel10 = 4700;
fuel11 = 7200;
fuel12 = 11700;
fuel13 = 14700;
fuel14 = 29700;
fuel15 = 49700;
break;
}
case 5: //this is pluto
{
fuel1 = 400;
fuel2 = 300;
fuel3 = 200;
fuel4 = 100;
fuel5 = 0; //here
fuel6 = 350;
fuel7 = 600;
fuel8 = 1100;
fuel9 = 2100;
fuel10 = 4600;
fuel11 = 7100;
fuel12 = 11600;
fuel13 = 14600;
fuel14 = 29600;
fuel15 = 49600;
break;
}
case 6: //this is system 467
{
fuel1 = 750;
fuel2 = 650;
fuel3 = 550;
fuel4 = 450;
fuel5 = 350;
fuel6 = 0; //here
fuel7 = 250;
fuel8 = 750;
fuel9 = 1750;
fuel10 = 4250;
fuel11 = 6750;
fuel12 = 11250;
fuel13 = 14250;
fuel14 = 29250;
fuel15 = 49250;
break;
}
case 7: //this is Langoon
{
fuel1 = 1000;
fuel2 = 900;
fuel3 = 800;
fuel4 = 700;
fuel5 = 600;
fuel6 = 250;
fuel7 = 0; //here
fuel8 = 500;
fuel9 = 1500;
fuel10 = 4000;
fuel11 = 6500;
fuel12 = 11000;
fuel13 = 14000;
fuel14 = 29000;
fuel15 = 49000;
break;
}
case 8: //this is Pizzariatan
{
fuel1 = 1500;
fuel2 = 1400;
fuel3 = 1300;
fuel4 = 1200;
fuel5 = 1100;
fuel6 = 750;
fuel7 = 500;
fuel8 = 0; //here
fuel9 = 1000;
fuel10 = 3500;
fuel11 = 6000;
fuel12 = 10500;
fuel13 = 13500;
fuel14 = 28500;
fuel15 = 48500;
break;
}
case 9: //this is Troiavis
{
fuel1 = 2500;
fuel2 = 2400;
fuel3 = 2300;
fuel4 = 2200;
fuel5 = 2100;
fuel6 = 1750;
fuel7 = 1500;
fuel8 = 1000;
fuel9 = 0; //here
fuel10 = 2500;
fuel11 = 5000;
fuel12 = 9500;
fuel13 = 12500;
fuel14 = 27500;
fuel15 = 47500;
break;
}
case 10: //this is skoustea
{
fuel1 = 5000;
fuel2 = 4900;
fuel3 = 4800;
fuel4 = 4700;
fuel5 = 4600;
fuel6 = 4250;
fuel7 = 4000;
fuel8 = 3500;
fuel9 = 2500;
fuel10 = 0; //here
fuel11 = 2500;
fuel12 = 7000;
fuel13 = 10000;
fuel14 = 25000;
fuel15 = 45000;
break;
}
case 11: //this is Xopra
{
fuel1 = 7500;
fuel2 = 7400;
fuel3 = 7300;
fuel4 = 7200;
fuel5 = 7100;
fuel6 = 6750;
fuel7 = 6500;
fuel8 = 6000;
fuel9 = 5000;
fuel10 = 2500;
fuel11 = 0; //here
fuel12 = 4500;
fuel13 = 7500;
fuel14 = 22500;
fuel15 = 42500;
break;
}
case 12: //this is yolanda
{
fuel1 = 12000;
fuel2 = 11900;
fuel3 = 11800;
fuel4 = 11700;
fuel5 = 11600;
fuel6 = 11250;
fuel7 = 11000;
fuel8 = 10500;
fuel9 = 9500;
fuel10 = 7000;
fuel11 = 4500;
fuel12 = 0; //here
fuel13 = 3000;
fuel14 = 18000;
fuel15 = 38000;
break;
}
case 13: //this is divinty
{
fuel1 = 15000;
fuel2 = 14900;
fuel3 = 14800;
fuel4 = 14700;
fuel5 = 14600;
fuel6 = 14250;
fuel7 = 14000;
fuel8 = 13500;
fuel9 = 12500;
fuel10 = 10000;
fuel11 = 7500;
fuel12 = 3000;
fuel13 = 0; //here
fuel14 = 15000;
fuel15 = 35000;
break;
}
case 14: //this is candyland
{
fuel1 = 30000;
fuel2 = 29900;
fuel3 = 29800;
fuel4 = 29700;
fuel5 = 29600;
fuel6 = 29250;
fuel7 = 29000;
fuel8 = 28500;
fuel9 = 27500;
fuel10 = 25000;
fuel11 = 22500;
fuel12 = 18000;
fuel13 = 15000;
fuel14 = 0; //here
fuel15 = 20000;
break;
}
case 15: //this is zeus
{
fuel1 = 50000;
fuel2 = 49900;
fuel3 = 49800;
fuel4 = 49700;
fuel5 = 49600;
fuel6 = 49250;
fuel7 = 49000;
fuel8 = 48500;
fuel9 = 47500;
fuel10 = 45000;
fuel11 = 42500;
fuel12 = 38000;
fuel13 = 35000;
fuel14 = 20000;
fuel15 = 0; //here
break;
}
}
}