var questions = new Array();
var choices = new Array();
var answers = new Array();
var prompts = new Array();
var response = new Array();
var CorrAns = new Array();

i=0;
questions[i] = "In the initial rack, one of the back corner balls must be a stripe and the other must be a solid.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "Which corner doesn't matter, but there must be one of each.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "On the opening break, the cue ball must strike the head ball first.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "That's required only in Rotation, 9-Ball or 10-Ball.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "In the initial rack, the stripes and solids must be alternated through the rack.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Only the location of the 8 Ball, and the pattern of the rear corner balls matter.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "Soft breaks are not legal in 8 Ball.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "No soft breaks allowed.";
choices[i][1] = "False  ";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "Four object balls, or three object balls and the cue ball, must hit a cushion to make a break legal.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Only object balls count, minimum number is 4.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "If a ball is pocketed on the break but only 3 balls hit a cushion, it's an illegal break and a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "A pocketed ball makes the break legal.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "After an illegal break, the incoming player can agree to accept the table as is and play from there.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "This is a legal option for the incoming layer.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "If the 8 Ball is pocketed on a legal break shot, it is a win for the breaking player.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Sorry, BCA rules minimize the value of luck.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "If the breaker scratches and also makes the 8 Ball, it is a loss for the breaking player.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Sorry, BCA rules minimize the benefits from luck.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "If a player scratches on the break and also makes the 8 Ball, the incoming player can choose to have the 8 Ball spotted and shoot from behind the headstring or have the original breaker rebreak.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "If there is a rebreak, it's by the incoming player.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "If an object ball is driven off the table on an otherwise legal break, it remains out of play and there is no foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "It is a foul to drive an object ball off the table.";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You must call your shot.  If you don't make the ball you intended to pocket, in the pocket you intended, your turn is over.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "BCA rules minimize the value of slop.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "You call a bank of the 7 cross-side.  You miss short but the ball goes 3 rails instead of 1 and falls into the named pocket.  You get credit for the legal shot and keep shooting.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "The only requirement is to call ball & pocket.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "On obvious shots, the shooter does not need to announce his shot.  It is the nonshooting player's responsibility to ask about a shot he is unsure of before it is made.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "This keeps the game from getting tedious.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "On non-obvious shots, it is the shooting player's responsibility to announce the shot he intends to shoot before he does so.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "This keeps everyone honest.";
choices[i][1] = "False  ";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "Banks and combinations are not considered obvious shots.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "Call them, even if they look obvious to you.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "Because bank shots are not considered obvious, the shooter should call bank shots before shooting them.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "Call them, even if they look obvious to you.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "If you intend to make the 10 Ball in the side by caroming it off the 6 Ball, you must call the carom as well as the pocket before shooting.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Ball and pocket are the only requirements.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "On an open table, it is legal to shoot the cue ball into a striped ball in order to combo in the called solid.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "On an open table, this combo is legal.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "On an open table, it is a foul to contact the 8 Ball first with the cue ball to make another ball.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "You cannot hit the 8 Ball first here.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "On an open table, it is a foul to play a safety by kissing the cue ball off the 8 Ball and then into a rail.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "You cannot hit the 8 Ball first here.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "You have solids.  It is legal to shoot the cue ball into the six and carom the six off the 8 Ball into the called side pocket.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "Ball & pocket are all you have to ever call.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "If the breaking player makes a stripe on the break, he is stuck with stripes even if he doesn't want them.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "BCA rules minimize the role of luck in the game.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You have stripes and intend to play safe.  You shoot the cue ball into the 9 Ball which then hits the 8 Ball. The 8 Ball hits the rail and no other balls do.  This is a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "If you don't hit the 8 Ball first, it's ok to hit it.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You intend to play safe.  You shoot the cue ball into the 7 Ball (you have solids) and it hits the 9 Ball which rolls right into the center of a pocket without touching a rail.  No other ball touches a rail.  This is a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Remember, pocketing a ball = hitting a rail.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "If a player calls 'safety' and then legally pockets one of his balls, his turn is over and the opponent has the table.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "In BCA rules, playing a safety ends your turn.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "It is the shooter's responsibility to ensure that his opponent knows he intends to play safe.  In the absence of a referee, if there is a disagreement as to whether he announced his intention to play safe, and he legally pocketed one of his object balls, he must continue shooting.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "This ensures the shooter's honesty.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "Players have to announce their intention to play safe.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "Only if they plan to pocket a ball.";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "When playing safe, the cue ball cannot hit a rail first, it must hit an object ball first and then a rail.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "You must get a rail after the collision; before is irrelevant.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "Your opponent has ball in hand.  He sets the cue ball on the table, gets down to shoot and then reaches out with his cuestick and rolls the cue ball 1/4 inch to the left with his ferrule.  This is a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "With the 2008 rule change, he could even use the tip as long as it wasn't with a forward stroke motion.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You have stripes.  You play a combination hitting the 12 Ball into the 8 Ball which knocks in the called 14 Ball.  This is a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "This is legal since you hit your ball ball first.";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You are on the 8 and your opponent still has the 10 Ball.  The 10, however, is directly between the 8 and the corner pocket.  You call the 8 in the blocked corner, combo the 8 into the 10 pocketing the 10, and the 8 Ball rolls in after it.  This is legal and you win the game.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "No rules were broken here; it's a win.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "You are playing cue ball fouls only.  You attempt a semi-masse shot, expecting to curve the cue ball around an obstacle ball and make the 5 in the side.  If the ball you are attempting to go around moves for any reason it is a foul.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "This is a special rule for masse type shots only.";
answers[i] = choices[i][0];
CorrAns[i] == 0;

i++;
questions[i] = "Three consecutive fouls by the same player is a loss of game.";
choices[i] = new Array();
choices[i][0] = "True  ";
prompts[i] = "Nope, not in BCA 8 Ball.";
choices[i][1] = "False  ";
answers[i] = choices[i][1];
CorrAns[i] == 1;

i++;
questions[i] = "You have one ball left (the 5) before the eight.  You see a shot where you can hit the 5 ball making it into the corner, and billiard the cue ball into the nearby 8 and make it in the other corner on the same shot.  You call both balls into their respective pockets.  This will be a win for you if the 5 ball falls first and a loss if the 8 goes in first.";
choices[i] = new Array();
choices[i][0] = "True  ";
choices[i][1] = "False  ";
prompts[i] = "You cannot shoot at the 8 Ball until you're on the 8.";
answers[i] = choices[i][1];
CorrAns[i] == 1;

// response for getting 100%
response[0] = "Excellent, a perfect score, consider referee school!";
// response for getting 95% or more
response[1] = "Excellent, top marks!"
// response for getting 90% or more
response[2] = "Well done, that is a good score, can you do better?";
// response for getting over 85%
response[3] = "Nice one, but you can do better.";
// response for getting 80% or more
response[4] = "Good, but you still got 1 in 5 incorrect.  You should study more.";
// response for getting 75% or more
response[5] = "Not too bad, but there's a lot of room for improvement.  Why not try again!?";
// response for getting 70% or more
response[6] = "This is a passing score, but barely.  Try again to improve!";
// response for getting less than 70%
response[7] = "Sorry, this is not a passing score. I suggest you try again!";