I've a switch and a functions 'block the case that are after it' at the 4th case of the switch.
I tried to move the case and apparently it's the 'P_JEU' case that block but I don't understand why.
switch (partie) {
case P_CHOIX_ANIM:
allPlayers.chenillard(250,100);
partie = P_CHOIX;
case P_CHOIX:
temp = allPlayers.checkInterro();
if (temp == 0) break;
if (temp == 1) { //Only 1 press
partie = P_JEU;
DEBUG_PRINTLN("P_CHOIX 1 press");
break;
}
partie = P_CHOIX_ERREUR;
break;
case P_JEU:
// Bug
if (bConfig.isPressed()) {
if (bConfig.getPressDuration()) {
if (bConfig.getPressDuration() <= 2000) {
partie = P_CHOIX_RESET;
} else {
bConfig.reset();
}
}
}
allPlayers.filteredCall(A_CHECK, J_PLAYER);
bool passResponse = allPlayers.Pass();
if (passResponse) { partie = P_JEU_REPONSE; }
break;
case P_CHOIX_RESET:
allPlayers.reset();
bConfig.reset();
partie = P_CHOIX_ANIM;
break;
default:
DEBUG_PRINTLN("Default");
partie = P_CHOIX_RESET;
break;
Thanks