Advertisement
Guest User

Java application

a guest
Feb 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. package javaapplication124;
  2.  
  3. import java.io.*;
  4.  
  5. public class JavaApplication124 {
  6.  
  7.  
  8. public static void main(String[] args) throws IOException {
  9. BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
  10.  
  11. displayStartMenu();
  12. System.out.print("Enter your choice: ");
  13. int choice = Integer.parseInt(br.readLine());
  14.  
  15. Player player;
  16.  
  17. if (choice == 1){
  18. player = new Player();
  19. player.hp = 100;
  20. player.baseAtk = 5;
  21. player.baseDef = 5;
  22. player.weapon = "";
  23. player.armor = "";
  24.  
  25.  
  26. while(true){
  27.  
  28. System.out.println("Battle Start Enemy 1");
  29. }
  30.  
  31. }
  32.  
  33. else if (choice == 5)
  34. System.exit (0);
  35. }
  36.  
  37. public static void displayStartMenu (){
  38. System.out.println("Welcome to Battle System Prototype v1\n"
  39. + "[1] Start Game\n"
  40. + "[5] Exit");
  41.  
  42. }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement