Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Spieler extends Barmann {
- //Eigenschaften vom Spieler
- public static float promille = 0;
- static String sex;
- static String name;
- static String alkoholWahl;
- static int age;
- int Kontostand = 100;
- //Alkohole
- public static String Vodka; //47%
- public static String Whiskey; //40%
- public static String Bier; //5%
- public Spieler(){
- }
- private static Scanner alkiScanner;
- public static void main(String[] args){
- introduction();
- }
- public static void introduction(){
- alkiScanner = new Scanner(System.in);
- System.out.println("Welcome to my first game - Alcoholics!");
- try{
- Thread.sleep(1000);
- } catch(InterruptedException ex){
- Thread.currentThread().interrupt();
- }
- System.out.println("May I know your name?");
- name = alkiScanner.nextLine();
- System.out.println("Welcome " + name + "! Nice to meet you.");
- /* System.out.println("What is your sex?");
- sex = alkiScanner.nextLine();
- System.out.println("How old are you?");
- age = alkiScanner.nextInt(); */
- System.out.println("This game is - as the name might already tell - about being an acoholic.");
- System.out.println("As you are an acoholic you do not have a job and relay on the state's money.");
- System.out.println("That being said, you have limited money to drink alcohol - however, you can earn your money by starting and winning barfights.");
- System.out.println("BUT be careful, someone might call the police!");
- System.out.println("Okay, let's get this going!");
- System.out.println("What do you want to do? (drink, sleep, barfight, check bankaccount)");
- trinken();
- }
- public static void trinken(){
- if(alkiScanner.nextLine().contains("drink")){
- System.out.println("What do you want to drink? Vodka costs 5€, Whiskey costs 10€ and Beer costs 3€");
- if(alkiScanner.nextLine().contentEquals("Whiskey")){
- Barmann.alkoholAusgeben(Whiskey);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement