Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class playerName {
- public static void main(String[] args){
- Scanner input = new Scanner (System.in);
- System.out.println("In a world where every turn is filled with\n" +
- "danger, the only thing that stands between you and\n" +
- "death is.... MENTAL MATH!!!!!");
- System.out.print("Enter Name:");
- String playerName = input.nextLine();
- System.out.println(playerName);
- if (playerName.equals("tak11")) {
- System.out.println("well I guess you win.");
- System.exit(0);
- } else {
- System.out.println("Welcome, " + playerName + "!");
- }
- System.out.println("The year is 2050. You are on the colonial planet\n" +
- "Zilon. Recently, a series of new alien races has appeared and\n" +
- "started scaring the citizens of the colony. It is up to you\n" +
- "and your amazing mental math skills to defeat the aliens and\n" +
- "save the colony. You may not use calculators while playing\n" +
- "this game. All math must be done mentally." +
- "Good luck," + playerName + ".");
- System.out.println("You are outside of the colony grounds,\n" +
- "doing a routine survey of the area. everything is guiet and\n" +
- "normal.");
- System.out.println("Oh no!!! A giant Lurker has jumped out of a hole\n" +
- "in the ground!!! What do you do?");
- System.out.print("Options:\n " +
- "1. Run screaming\n" +
- "2. Pull out your sword and hack away\n" +
- "3. Punch the Lurker in the face\n" +
- "4. Try to make friends with it \n");
- System.out.print("Put the number of your choice:");
- if (playerOption.equals("1")) {
- System.out.println("You run screaming. The Lurker attacks" +
- "the colony, killing all the colonists. You fail in" +
- "your main objective. Game Over.");
- System.exit(0);
- if (playerOption.equals("2")) {
- System.out.print("You attack the Lurker. Find the answer to" +
- "25 + 15 to figure out how much damage is done.\n" +
- "Answer:");
- }
- }
- public class playerOption {
- public void main(String[] args){
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement