static final String[][] SENTENCES = {
{
"Welcome to the game of life!",
"You are in your fourth year of high school.",
"There is this one girl whom you like.",
"One day, you decided to tell her your feelings after school.",
"She is coming your way. What do you do?",
"1. Go to her and tell her how you feel.",
"2. Wait a while." },
{
"You told her how you feel.",
"She suddenly embraced you.",
"As you pushed her away, a man came and shot her in the head.",
"She was a zombie. You're lucky I'm here.",
"My name is Jack. Want to team up with me?",
"1. Yes / 2. No" },
{
"You waited for a while.", "She ran onto the road.",
"She went out of sight.", "Will you follow her?",
"1. Yes / 2. No" },
{
"He suddenly embraced you.",
"As you pushed him away, a woman came and shot him in the head.",
"These zombies are getting smart. Name's Rose.",
"Wanna team up?", "1. Yes / 2. No" },
{
"Hey, anyway, help me sell these bananas!",
"He forced you to sell bananas against your will.",
"You hit him with these bananas, and he falls to the ground.",
"The police, who shot down zombies before reaching you, handcuffed you and put you in their patrol car.",
"BAD END", "1. to continue / 2. for bananas", },
{
"You ran after her.",
"You see her run around a bench, and into a corner.",
"As you followed her, you find yourself in a magical land of unicorns and rainbows.",
"You find a unicorn approach you in a friendly manner.",
"You find a chocolate bar in your pocket.",
"1. Give / 2. Eat" },
{
"So you're not going to follow her?",
"Really?",
"You don't deserve to tell her your feelings.",
"She could be just waiting for you to tell her how you feel.",
"If you're a man, act like one.",
"You don't deserve to continue this game.", "THE END" },
{
"Hey, you don't remember me?",
"You really don't remember me? You confessed to me, didn't you?",
"I'm not really sure how I feel for you, but I'll give it time.",
"It's all right, we'll start over. This world needs to change.",
"We are, after all, the remaining humans left in this world of zombies, aren't we?",
"THE END" },
{
"Well, too bad.",
"Good luck, anyway.",
"Here, a revolver. You'll need it in this world.",
"We are, after all, the remaining humans left in this world of zombies, aren't we?",
"THE END" },
{ "You are in a prison cell.", "THE END" },
{
"BANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANANA",
"boat.", "THE END" },
{
"You give the unicorn your chocolate bar.",
"It transforms into a giant cactus and gives you the ability to fly.",
"I have given you this power for now.",
"Do more good deeds, and you may gain more.",
"The fate of the world is in your hands.", "THE END" },
{
"You eat the chocolate bar in front of the unicorn.",
"You wake up at school.",
"YOu realized that you were dreaming the whole time.",
"There is this one girl whom you like.",
"One day, you decided to tell her your feelings after school.",
"She is coming your way. What do you do?", "THE END" },
};
static void decide(int accPos) {
for (String s : SENTENCES[accPos - 1])
System.out.println(s);
if (2 * accPos <= SENTENCES.length
&& SENTENCES[(2 * accPos) - 1] != null) {
int childPosition = 2 * accPos + (SavitchIn.readLineInt() - 1);
decide(childPosition);
}
}
public static void main(String[] args) {
decide(1);
}