title: Java Role playing game
body: <p>Trying to design a role playing game in java, code stops after "a" is selected and name is entered as target. Not sure what is going on. Tried changing while to a for, but nothing has worked.
  Much thanks in advance</p>
  
  <pre><code>package fantasy.rpg;
  import java.util.Scanner;
  import java.util.ArrayList;
  
  public class FantasyRPG {
  public static void main(String[] args) {
      String name;
      String newName;
      String race;
  
      ArrayList&lt;Creature&gt; Player = new ArrayList();
  
      Scanner reader = new Scanner(System.in);
      System.out.println("Welcome to the Fantasy Game"+"\n");
      System.out.println("    1. Add the game players");
      System.out.println("    2. Playes play in turn until only one is left"+"\n");
      System.out.println("Good Luck!"+"\n");
      System.out.println("First, let's add some players:"+"\n");
      System.out.println("");
      System.out.println("Enter player's name ('quit' when no more players):");
      name= reader.nextLine();
      System.out.println(name + ", what race are you?");
      System.out.println("    H/h: human \n    C/c: Cyberdemon \n    E/e: Elf \n    B/b: Balrog \n");
      System.out.print("Please enter your race: ");
      race = reader.next();
  
      Creature player = new Creature(name, race);
      Player.add(player);
  
      System.out.println("");
      System.out.println("Enter player's name ('quit' when no more players):");
      newName = reader.next();
  
      while(!"quit".equals(newName)){
  
          System.out.println(newName + ", what race are you?");
          System.out.println("    H/h: human \n    C/c: Cyberdemon \n    E/e: Elf \n    B/b: Balrog \n");
          System.out.print("Please enter your race: ");
  
          race = reader.next();
          player = new Creature(newName, race);
          Player.add(player);
  
          System.out.println("");
          System.out.println("Enter player's name ('quit' when no more players):");
          newName = reader.next();
          }
  
      System.out.println("Congratulations new fighters. ");
      System.out.println("You will pitted against each other \nin a fight to the death");
      System.out.println("The last one standing wins. \nGood luck.");
      System.out.println("  |Name|   |Species|     |Strength|      |Hit Points|");
      for(int count = 0; count &lt;= Player.size()-1; count++ ){
          Creature p = Player.get(count);
          System.out.println(p.toString());}
      System.out.println("The Players are ready! \nLet the Battle Begin!");
      for(int i=0; i&lt;=Player.size()-1; i++){
          Player.get(i);
          System.out.println(name.toString()+", select one of the following options:");
          System.out.println("    a/A: Attack an opponent");
          System.out.println("    p/P: Pass (go to the next player");
          System.out.println("    q/Q: Quit the game");
          String choice=reader.next();
              if(choice.equals("a")||choice.equals("A")){
                  System.out.println("Which player are you attacking? ");
                  String target=reader.next();
                  int hitp=0;
                  for(int j=0; j&lt;Player.size()-1; j++){
                      Player.get(j);
                      String targetName=name;
                      if(target.equals(targetName)){
                           hitp=Creature.getHitpoints(name);  
                      }
                      else{
                      j++;
                  }
                  }
  
                  int HitDam=Creature.getDamage(race, hitp);
                  Creature.Damage(HitDam);
              }
              else if(choice.equals("p")||choice.equals("P")){
                  return;
              }
              else if(choice.equals("q")||choice.equals("Q")){
                  Player.remove(i);
              }
              for(int m=0; m&lt;Player.size()-1; i++){
                  int stren=0;
                  Player.get(m);
                  stren=Creature.getStrength();
  
                  if (Creature.isDead(stren)){
  
                      System.out.println("Sorry, "+name.toString()+", but you are dead. Thanks for playing!");
                              Player.remove(m);
              }
              }
                  System.out.println("  |Name|   |Species|     |Strength|      |Hit Points|");
                  for(int count = 0; count &lt;= Player.size()-1; count++ ){
                      Creature p = Player.get(count);
                      System.out.println(p.toString());
                  }
      }
      }
  }
  </code></pre>
  
  <p>Creature class</p>
  
  <pre><code>package fantasy.rpg;
  
  public class Creature {
  static int Strength;
  static int HitPoints;
  String Name = "";
  String Species = "";
  int damage;
  
  public Creature(String name, String species){
      Name = name;
  
      if(species.equals("h")||species.equals("H")){
          Species = "Human";
          Strength = 115;
          HitPoints = 15;}
      else if(species.equals("C")||species.equals("c")){
          Species = "Cyberdemon";
          Strength = 135;
          HitPoints = 20;}
      else if(species.equals("E")||species.equals("e")){
          Species = "Elf";
          Strength = 185;
          HitPoints = 18;
          }
      else if(species.equals("B")||species.equals("b")){
          Species = "Balrog";
          Strength = 105;
          HitPoints = 30;}
  
  
  
  
      }
  public static int getHitpoints(String player){
      return HitPoints;
  }
  
  public String getSpecies(){
      return Species;
  }
  public static int getStrength(){
  
      return Strength;
  }
  
  public void setStrength(int newStrength){
      Strength = newStrength;}
  
  public void setHitPoints(int newHit){
      HitPoints = newHit;}
  
  public static int getDamage(String Species, int Hit){
  
      int hit = 0+ (int)(Math.random()*(Hit-0));
      if(Species == "demon"){
          int r =(int)(Math.random());
          if(r &lt; .05)
              hit = hit + 50;
      }
      else if(Species == "elf"){
          int r = (int)(Math.random());
          if(r &lt; .1)
              hit = hit + 50;
      }
      else if(Species == "balrog"){
          int balrogDouble = 0 + (int)(Math.random() * Hit - 0);
          hit = hit + balrogDouble;}
  
  
      int damage = hit;
      return damage;
  }
  
  public  static void Damage(int damage){
     Strength= Strength-damage;}
  
  public static boolean isDead(int str){
      if(str &lt;= 0)
          return true;
      else
          return false;
  
          }
  
  public String getName(){
      return Name;
  }
  public boolean isNamed(String aName){
      return aName.equals(Name);
  }
  
  public String toString(){
      return  "   " +Name  + "      " + Species + "           " + Strength + "              " + HitPoints; }
  
  
  
  }
  </code></pre>