import java.util.*; import java.io.*; import java.lang.*; public class AnimalCrossingTest { public static String name, town, temp; public static Scanner scan = new Scanner(System.in); public static int bellBalance; public static void intro() { //*****INTRO***** System.out.println("Welcome to the crazy, wonderful\nworld of Animal Crossing!"); System.out.println(); System.out.println("*******************************"); System.out.println(); //**NAME** boolean ready=false; do { System.out.print("Go ahead and enter your name: "); name = scan.nextLine(); char n = Character.toUpperCase(name.charAt(0)); String qu = name.substring(1); name = n+qu; System.out.println(); System.out.print("Okay, "+name+"!\n...that is your name, right? "); temp = scan.nextLine(); System.out.println(); if(temp.equalsIgnoreCase("yes")) { System.out.println("Whew! I'm glad that's settled, "+name+"!"); System.out.println(); ready=true; } } while(ready==false); //**GENDER** ready=false; boolean boy=true; do { do { System.out.print("Well, then are you a boy or a girl? "); temp=scan.nextLine(); if(temp.equalsIgnoreCase("girl")) { boy=false; System.out.println(); ready=true; } if(temp.equalsIgnoreCase("boy")) { boy=true; System.out.println(); ready=true; } } while(ready==false); if(boy==true) { System.out.print("You're a boy, huh? "); temp = scan.nextLine(); if(temp.equalsIgnoreCase("no")) { ready=false; } System.out.println(); } if(boy==false) { System.out.print("You're a girl, huh? "); temp = scan.nextLine(); if(temp.equalsIgnoreCase("no")) { ready=false; } System.out.println(); } } while(!temp.equalsIgnoreCase("yes")); //**TOWN*NAME** ready=false; do { do { System.out.print("So, where you headed? "); town = scan.nextLine(); char t = Character.toUpperCase(town.charAt(0)); String q = town.substring(1); town = t+q; System.out.println(); System.out.print("Did I hear that right? I think you said "+town+"... "); temp=scan.nextLine(); } while(!temp.equalsIgnoreCase("yes")); if(temp.equalsIgnoreCase("yes")) { System.out.println(); System.out.println("Onward to "+town+"!"); ready=true; } } while(ready=false); //**CREATE*PLAYER** System.out.println(); CharacterObj player = new CharacterObj(name,town,boy,1000); System.out.println(player.toString()); //**CREATING*MUSEUM** Museum muse = new Museum(); //**ADDING*FOSSILS*TO*MUSEUM** createFossils(); muse.addFossil(amber); System.out.println("Current collection of the museum in "+town+":"); System.out.println(); System.out.println(muse.toString()); muse.listFossils(); //**CREATING*THE*TOWN** Town myTown = new Town(town, 0); myTown.showMap(); } //Name of fossil, price if sold, and owned or not public static void createFossils() { Fossil amber = new Fossil("Amber", 1200, false); Fossil dinoe = new Fossil("Dinosaur Egg", 1400, false); Fossil ammo = new Fossil("Ammonite", 1100, false); Fossil track = new Fossil("Dinosaur Track", 1000, false); Fossil mamTo = new Fossil("Mammoth Torso", 2500, false); Fossil mamSk = new Fossil("Mammoth Skull", 3000, false); Fossil plesTo = new Fossil("Plesio Torso", 4500, false); Fossil plesNe = new Fossil("Plesio Neck", 4500, false); Fossil plesSk = new Fossil("Plesio Skull", 4000, false); Fossil pteRW = new Fossil("Ptera Right Wing", 4500, false); Fossil pteLW = new Fossil("Ptera Left Wing", 4500, false); Fossil pteSk = new Fossil("Ptera Skull", 4000, false); Fossil steTi = new Fossil("Stego Tail", 4000, false); Fossil steTo = new Fossil("Stego Torso", 4500, false); Fossil steSk = new Fossil("Stego Skull", 5000, false); Fossil apaTa = new Fossil("Apato Tail", 4000, false); Fossil apaTo = new Fossil("Apato Torso", 4500, false); Fossil apaSk = new Fossil("Apato Skull", 5000, false); Fossil rexTa = new Fossil("T-Rex Tail", 5000, false); Fossil rexTo = new Fossil("T-Rex Torso", 5500, false); Fossil rexSk = new Fossil("T-Rex Skull", 6000, false); Fossil triTa = new Fossil("Tricera Tail", 4500, false); Fossil triTo = new Fossil("Tricera Torso", 5000, false); Fossil triSk = new Fossil("Tricera Skull", 5500, false); } public static void createFish() { //River or big pond Fish angel = new Fish("Angelfish", 3000, false); Fish arapa = new Fish("Arapaima", 10000, false); Fish arowa = new Fish("Arowana", 10000, false); Fish barbe = new Fish("Barbel Steed", 200, false); Fish bass = new Fish("Bass", 300, false); Fish bitte = new Fish("Bitterling", 1300, false); Fish blueg = new Fish("Bluegill", 120, false); Fish carp = new Fish("Carp", 300, false); Fish catfi = new Fish("Catfish", 200, false); Fish cherr = new Fish("Cherry Salmon", 1300, false); Fish cruci = new Fish("Crucian Carp", 120, false); Fish dace = new Fish("Duce", 200, false); Fish eel = new Fish("Eel", 2000, false); Fish guppy = new Fish("Freshwater Guppy", 1300, false); Fish killi = new Fish("Killifish", 300, false); Fish koi = new Fish("Koi", 2000, false); Fish lbass = new Fish("Large Bass", 3000, false); Fish loach = new Fish("Loach", 300, false); Fish palec = new Fish("Pale Chub", 200, false); Fish piran = new Fish("Piranha", 6500, false); Fish ponds = new Fish("Pond Smelt", 300, false); Fish popey = new Fish("Popeyed Goldfish", 1300, false); Fish rainb = new Fish("Rainbow Trout", 650, false); Fish sbass = new Fish("Small Bass", 200, false); Fish strin = new Fish("Stringfish", 15000, false); Fish sweet = new Fish("Sweetfish", 1300, false); //Big pond only Fish brook = new Fish("Brook Trout", 150, false); Fish gcatf = new Fish("Giant Catfish", 15000, false); Fish gsnak = new Fish("Giant Snakehead", 6500, false); //Ocean fish Fish barre = new Fish("Barred Knifejaw", 5000, false); Fish coela = new Fish("Coelacanth", 15000, false); Fish jelly = new Fish("Jellyfish", 100, false); Fish redsn = new Fish("Red Snapper", 3000, false); Fish salmo = new Fish("Salmon", 650, false); Fish seaba = new Fish("Sea Bass", 120, false); //Small pond fish Fish crawf = new Fish("Crawfish", 250, false); Fish frog = new Fish("Frog", 250, false); //Waterfall only Fish lchar = new Fish("Large Char", 10000, false); } public static void createBugs() { //Flying about Bug bande = new Bug("Banded Dragonfly", 4500, false); Bug cbutt = new Bug("Common Butterfly", 80, false); Bug cdrag = new Bug("Common Dragonfly", 130, false); Bug darnd = new Bug("Darner Dragonfly", 200, false); Bug mosqu = new Bug("Mosquito", 130, false); Bug purpb = new Bug("Purple Butterfly", 2000, false); Bug redbu = new Bug("Red Butterfly", 80, false); Bug tigbu = new Bug("Tiger Butterfly", 200, false); Bug yelbu = new Bug("Yellow Butterfly", 80, false); //On trees Bug bagwo = new Bug("Bagworm", 250, false); Bug bee = new Bug("Bee", 4500, false); Bug broci = new Bug("Brown Cicada", 200, false); Bug drone = new Bug("Drone Beetle", 80, false); Bug dynas = new Bug("Dynastid Beetle", 1350, false); Bug eveni = new Bug("Evening Cicada", 850, false); Bug fstag = new Bug("Flat Stag Beetle", 2000, false); Bug gbeet = new Bug("Giant Beetle", 10000, false); Bug jewel = new Bug("Jewel Beetle", 3000, false); Bug longh = new Bug("Longhorn Beetle", 200, false); Bug mount = new Bug("Mountain Beetle", 2000, false); Bug robus = new Bug("Robust Cicada", 300, false); Bug sawst = new Bug("Saw Stag Beetle", 2000, false); Bug spide = new Bug("Spider", 300, false); Bug walke = new Bug("Walker Cicada", 400, false); //On flowers Bug ladyb = new Bug("Ladybug", 130, false); Bug manti = new Bug("Mantis", 430, false); Bug snail = new Bug("Snail", 250, false); Bug splad = new Bug("Spotted Ladybug", 200, false); //Near water Bug firef = new Bug("Firefly", 250, false); Bug ponds = new Bug("Pondskater", 130, false); //In patches of grass or on ground Bug bellc = new Bug("Bell Cricket", 430, false); Bug grass = new Bug("Grasshopper", 130, false); Bug llocu = new Bug("Long Locust", 200, false); Bug mlocu = new Bug("Migratory Locust", 1350, false); Bug pinec = new Bug("Pine Cricket", 100, false); //Miscellaneous Bug ant = new Bug("Ant", 80, false); Bug cockr = new Bug("Cockroach", 5, false); Bug molec = new Bug("Mole Cricket", 200, false); Bug pillb = new Bug("Pill Bug", 250, false); } public static void createPaintings() { Painting amaze = new Painting("Amazing Painting", false); Painting basic = new Painting("Basic Painting", false); Painting classi = new Painting("Classic Painting", false); Painting commo = new Painting("Common Painting", false); Painting daint = new Painting("Dainty Painting", false); Painting famou = new Painting("Famous Painting", false); Painting fine = new Painting("Fine Painting", false); Painting flowe = new Painting("Flowery Painting", false); Painting movin = new Painting("Moving Painting", false); Painting perfe = new Painting("Perfect Painting", false); Painting quain = new Painting("Quaint Painting", false); Painting rare = new Painting("Rare Painting", false); Painting scary = new Painting("Scary Painting", false); Painting stran = new Painting("Strange Painting", false); Painting worth = new Painting("Worthy Painting", false); } public static void main(String[] args) { createFossils(); intro(); } }