Jayson/lightsout/LightsOutStart

From ggc

Jump to: navigation, search

01 //package lightsout;
02 package Jayson.lightsout;
03 import java.util.*;
04 import wiki.Wiki;
05 /**
06  * Starts of the light out game.  Checks if the user wants a GUI or Text Interface
07  @author Jpark
08  */
09 public class LightsOutStart
10 {
11   public LightsOutStart()
12   {}
13   /**Main method*/
14   public static void main(String[] args)
15   {
16     LightsOutStart lightsoutstart = new LightsOutStart();
17     Wiki.out.print("Which interface would you like to use:\nText or GUI?");
18     Scanner scanner=new Scanner(Wiki.in);
19     String choice=scanner.next();
20     Wiki.out.println(choice);
21     while(!choice.equals("Text"&& !choice.equals("GUI"))
22     {
23       Wiki.out.println("Please type Text or GUI.");
24       Wiki.out.print("Which interface would you like to use:\nText or GUI?");
25       choice = scanner.next();
26     }
27     if(choice.equals("Text"))
28     {
29       LightsOutText.main(null);
30     }
31     else
32     {
33       LightsOut.main(null);
34     }
35   }
36 }


Download/View Jayson/lightsout/LightsOutStart.java





Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter