Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.08 KB | None | 0 0
  1. PASTEBINnew paste
  2.  
  3.  
  4. Untitled
  5.  A GUEST   SEP 25TH, 2018   79  NEVER
  6.  
  7. Upgrade to PRO!  
  8. rawdownloadreport 1.70 KB
  9. package RPG;
  10.  
  11. import java.util.ArrayList;
  12. import java.util.Scanner;
  13.  
  14. public class Main {
  15.     public static void objectCreator(int index){
  16.         ArrayList<Character> load = new ArrayList<Character>();
  17.         switch(index){
  18.             case 1: Character warrior = new Warrior(0,0,0,0); // konstrukto todo
  19.                 load.add(warrior);
  20.                 break;
  21.  
  22.         }
  23.         public void characterCreation(){
  24.             int pick;
  25.             Scanner scan = new Scanner;
  26.  
  27.             System.out.println("Pick your Character:"
  28.                     + "1.Warrior");
  29.             pick = scan.nextInt();
  30.             objectCreator(pick);
  31.  
  32.  
  33.  
  34.  
  35.         }
  36.  
  37.  
  38.     }
  39.     public static void main(String[] args) {
  40.  
  41.         Scanner scanner = new Scanner(System.in); // skaner wysypuje
  42.         int input = 1;
  43.         while (input != 3) {
  44.  
  45.  
  46.             switch (input) {
  47.                 case 1:
  48.                     System.out.print("-----MENU----\n"
  49.                             + "Press a number + enter to proceed.\n"
  50.                             + "1. START\n"
  51.                             + "2. LOAD\n"
  52.                             + "3. EXIT\n");
  53.                     input = scanner.nextInt();
  54.                     break;
  55.                 case 2:
  56.                     System.out.print("case 2\n");
  57.                     characterCreation();
  58.                     input = 1;
  59.                     break;
  60.                 case 3:
  61.                     System.out.print("case 3\n");
  62.                     input = 1;
  63.                     break;
  64.                 case 4:
  65.                     System.out.print("case 4\n");
  66.                     input = 1;
  67.                     break;
  68.             }
  69.  
  70.  
  71.         }
  72.     }
  73. }
  74. RAW Paste Data
  75.  
  76. package RPG;
  77.  
  78. import java.util.ArrayList;
  79. import java.util.Scanner;
  80.  
  81. public class Main {
  82.     public static void objectCreator(int index){
  83.         ArrayList<Character> load = new ArrayList<Character>();
  84.         switch(index){
  85.             case 1: Character warrior = new Warrior(0,0,0,0); // konstrukto todo
  86.                 load.add(warrior);
  87.                 break;
  88.  
  89.         }
  90.         public void characterCreation(){
  91.             int pick;
  92.             Scanner scan = new Scanner;
  93.  
  94.             System.out.println("Pick your Character:"
  95.                     + "1.Warrior");
  96.             pick = scan.nextInt();
  97.             objectCreator(pick);
  98.  
  99.  
  100.  
  101.  
  102.         }
  103.  
  104.  
  105.     }
  106.     public static void main(String[] args) {
  107.  
  108.         Scanner scanner = new Scanner(System.in); // skaner wysypuje
  109.         int input = 1;
  110.         while (input != 3) {
  111.  
  112.  
  113.             switch (input) {
  114.                 case 1:
  115.                     System.out.print("-----MENU----\n"
  116.                             + "Press a number + enter to proceed.\n"
  117.                             + "1. START\n"
  118.                             + "2. LOAD\n"
  119.                             + "3. EXIT\n");
  120.                     input = scanner.nextInt();
  121.                     break;
  122.                 case 2:
  123.                     System.out.print("case 2\n");
  124.                     characterCreation();
  125.                     input = 1;
  126.                     break;
  127.                 case 3:
  128.                     System.out.print("case 3\n");
  129.                     input = 1;
  130.                     break;
  131.                 case 4:
  132.                     System.out.print("case 4\n");
  133.                     input = 1;
  134.                     break;
  135.             }
  136.  
  137.  
  138.         }
  139.     }
  140. }
  141.  
  142. We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
  143. IBM CLOUD PRIVATE FREE TRIAL: DEPLOY. MANAGE. SCALE YOUR APP.
  144.  
  145.              
  146. create new paste  /  dealsnew!  /  syntax languages  /  archive  /  faq  /  tools  /  night mode  /  api  /  scraping api  /  go  
  147. privacy statement  /  cookies policy  /  terms of service  /  security disclosure  /  dmca  /  contact
  148.  
  149. Dedicated Server Hosting by Steadfast
  150. Top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement