I'm using android studio to create a multiple choice question app, and i've coded the quiz but so far it just goes on forever. I want to make it so that once the user has answered 20 questions, whether they are right or wrong, the game ends and sends them to an endscreen that I have created, but so far I can't figure out what to do to make this happen.
this is what i've tried, it doesn't crash the program but it also doesn't actually do anything.
private int round = 0;
round = round + 1;
if (round == 20) {
startActivity(new Intent (game.this, endscreen.class));
}
I'm new to Java so it might be quite a simple solution (sorry if it is)
any ideas?