public static void startUpRoleChooser() {
    System.out.print("Welcome to Mafia! How many players? ");
    Scanner s = new Scanner(System.in);

    String in = "";
    int numPlayers = 0;
    while (numPlayers <= 0) {
      in = s.nextLine();
      try {
        numPlayers = Integer.parseInt(in);
        if (numPlayers <= 0) {
          System.out.print("Please input a positive integer: ");
        }
      } catch (NumberFormatException E) {
        System.out.print("Please input an integer: ");
      }
    }

    System.out.println();

    game = new Game();

    int numRolesRemaining = numPlayers; // number of roles left to assign
    String[] roles = {
      "mafia",
      "godfathers",
      "framers",
      "cops",
      "doctors",
      "bombs",
      "drunks",
      "vigilantes",
      "grannies",
      "fools",
      "hookers",
      "serialkillers",
      "villager"
    };
    int[] numOfEachRole = new int[roles.length]; // array for the number of people with that role
    int i = 0;
    while (numRolesRemaining > 0) {
      if (i == roles.length - 1) { // in case gone through all the roles and still have extras
        numOfEachRole[i] = numRolesRemaining;
        numRolesRemaining = 0;
      } else {
        System.out.print("How many " + roles[i] + "? ");

        int temp = -1;
        while (temp < 0 || temp > numRolesRemaining) {
          in = s.nextLine();
          try {
            temp = Integer.parseInt(in);
            if (temp < 0) {
              System.out.print("Please input a nonnegative integer: ");
            }
          } catch (NumberFormatException E) {
            System.out.print("Please input an integer: ");
          }
        }
        numOfEachRole[i] = temp;
        numRolesRemaining -= temp;
      }
      i++;
    }
    System.out.println("numofEachRole:" + Arrays.toString(numOfEachRole));

    String[] names = new String[numPlayers];
    int index = 0;
    while (index < names.length) {
      System.out.println("Player " + (index + 1));
      System.out.print("What is your name? ");
      String name = s.nextLine();
      while (Arrays.asList(names).contains(name)) {
        System.out.print("That name has already been chosen. Please choose another name: ");
        name = s.nextLine();
      }

      names[index] = name;
      index++;
    }

    ArrayList<String> rolesInGame = new ArrayList<String>(); // all the valid roles in game
    for (i = 0; i < numOfEachRole.length; i++) {
      for (int j = numOfEachRole[i]; j > 0; j--) {
        rolesInGame.add(roles[i]); // j roles of type i
      }
    }
    System.out.println(rolesInGame);

    for (i = 0; i < names.length; i++) {
      int rand = (int) (Math.random() * rolesInGame.size());
      String roleForI = rolesInGame.get(rand);
      rolesInGame.remove(rand);
      System.out.println("roleForI: " + roleForI);
      System.out.println("rolesInGame: " + rolesInGame);
      switch (roleForI) {
          // "mafia","godfathers","framers","cops","doctors","bombs","drunks","vigilantes","grannies","fools","hookers","serialkillers","villager"
        case "mafia":
          game.addPlayer(new Mafia(names[i]));
          break;
        case "godfathers":
          game.addPlayer(new Godfather(names[i]));
          break;
        case "framers":
          game.addPlayer(new Framer(names[i]));
          break;
        case "cops":
          game.addPlayer(new Cop(names[i]));
          /*
          double rando = Math.random();
          if (rando < 0.25){
              game.addPlayer(new Cop(names[i]));
          }
          else if (rando < 0.5){
              game.addPlayer(new NaiveCop(names[i]));
          }
          else if (rando < 0.75){
              game.addPlayer(new ParanoidCop(names[i]));
          }
          else {
              game.addPlayer(new InsaneCop(names[i]));
          }
          break;
          */
          break;
        case "doctors":
          game.addPlayer(new Doctor(names[i]));
          break;
        case "bombs":
          game.addPlayer(new Bomb(names[i]));
          break;
        case "drunks":
          game.addPlayer(new Drunk(names[i]));
          break;
        case "vigilantes":
          game.addPlayer(new Vigilante(names[i]));
          break;
        case "grannies":
          game.addPlayer(new Granny(names[i]));
          break;
        case "fools":
          game.addPlayer(new Fool(names[i]));
          break;
        case "hookers":
          game.addPlayer(new Hooker(names[i]));
          break;
        case "serialkillers":
          game.addPlayer(new SerialKiller(names[i]));
          break;
        default:
          game.addPlayer(new Villager(names[i]));
          break;
      }
    }
  }
  public static void addPlayer() { // temporary thing for testing purposes
    String[] types = {
      "villager",
      "mafia",
      "godfather",
      "framer",
      "cop",
      "doctor",
      "bomb",
      "drunk",
      "vigilante",
      "granny",
      "fool",
      "hooker",
      "serialkiller"
    };

    Scanner s = new Scanner(System.in);
    System.out.println("What kind of player would you like to be? ");
    for (String str : types) {
      System.out.print(
          str + " "
              // + "[" + str.substring(0,1) + "]"
              + " ");
    }
    System.out.println();
    String in = s.nextLine();
    in = in.toLowerCase();
    System.out.print("What is your name? ");
    String name = s.nextLine();
    while (!(validateName(name))) {
      System.out.print("That name has already been chosen. Please choose another name: ");
      name = s.nextLine();
    }

    Player temp = null;

    if (in.equals("villager") || in.equals("v")) {
      temp = new Villager(name);
    } else if (in.equals("mafia") || in.equals("m")) {
      temp = new Mafia(name);
    } else if (in.equals("godfather")) {
      temp = new Godfather(name);
    } else if (in.equals("cop") || in.equals("c")) {
      double rand = Math.random();
      if (rand < 0.25) {
        temp = new Cop(name);
      } else if (rand < 0.5) {
        temp = new NaiveCop(name);
      } else if (rand < 0.75) {
        temp = new ParanoidCop(name);
      } else {
        temp = new InsaneCop(name);
      }
    } else if (in.equals("doctor") || in.equals("d")) {
      temp = new Doctor(name);
    } else if (in.equals("bomb")) {
      temp = new Bomb(name);
    } else if (in.equals("drunk")) {
      temp = new Drunk(name);
    } else if (in.equals("vigilante")) {
      temp = new Vigilante(name);
    } else if (in.equals("granny")) {
      temp = new Granny(name);
    } else if (in.equals("fool")) {
      temp = new Fool(name);
    } else if (in.equals("hooker")) {
      temp = new Hooker(name);
    } else if (in.equals("SerialKiller")) {
      temp = new SerialKiller(name);
    } else {
      temp = new Villager(name);
    }
    // temporary final assignment
    // there's gotta be a better way to do this

    game.addPlayer(temp);
  }