Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Spieler extends Barmann {
  4. //Eigenschaften vom Spieler
  5. public static float promille = 0;
  6. static String sex;
  7. static String name;
  8. static String alkoholWahl;
  9. static int age;
  10. int Kontostand = 100;
  11.  
  12. //Alkohole
  13. public static String Vodka; //47%
  14. public static String Whiskey; //40%
  15. public static String Bier; //5%
  16.  
  17. public Spieler(){
  18.  
  19. }
  20. private static Scanner alkiScanner;
  21.  
  22. public static void main(String[] args){
  23. introduction();
  24.  
  25. }
  26.  
  27. public static void introduction(){
  28. alkiScanner = new Scanner(System.in);
  29. System.out.println("Welcome to my first game - Alcoholics!");
  30. try{
  31. Thread.sleep(1000);
  32. } catch(InterruptedException ex){
  33. Thread.currentThread().interrupt();
  34. }
  35. System.out.println("May I know your name?");
  36. name = alkiScanner.nextLine();
  37. System.out.println("Welcome " + name + "! Nice to meet you.");
  38. /* System.out.println("What is your sex?");
  39. sex = alkiScanner.nextLine();
  40. System.out.println("How old are you?");
  41. age = alkiScanner.nextInt(); */
  42. System.out.println("This game is - as the name might already tell - about being an acoholic.");
  43. System.out.println("As you are an acoholic you do not have a job and relay on the state's money.");
  44. System.out.println("That being said, you have limited money to drink alcohol - however, you can earn your money by starting and winning barfights.");
  45. System.out.println("BUT be careful, someone might call the police!");
  46. System.out.println("Okay, let's get this going!");
  47. System.out.println("What do you want to do? (drink, sleep, barfight, check bankaccount)");
  48. trinken();
  49.  
  50. }
  51.  
  52. public static void trinken(){
  53. if(alkiScanner.nextLine().contains("drink")){
  54. System.out.println("What do you want to drink? Vodka costs 5€, Whiskey costs 10€ and Beer costs 3€");
  55. if(alkiScanner.nextLine().contentEquals("Whiskey")){
  56. Barmann.alkoholAusgeben(Whiskey);
  57. }
  58. }
  59. }
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement