I'm pretty sure this may not be a greenfoot problem, but I need some help with this problem. I think I got something wrong with the ms.getMoveset.size() but can someone double-check for me?
problem:
and here is the Moveset class:
public void Attack()
{
Moves m1 = new Moves("Skull Bash",130,100,"Normal","Physical");
Moves m2 = new Moves("Hydro Pump",110,80,"Water","Special");
Moves m3 = new Moves("Ice Beam",90,100,"Ice","Special");
Moves m4 = new Moves("Weather Ball",50,100,"Normal","Special");
Moveset ms = new Moveset(m1,m2,m3,m4);
Scanner scan = new Scanner(System.in);
System.out.println("Enter: Fight or Run");
if(scan.nextLine()=="Run")
{
System.out.println("Choose a move: ");
for(int i = 0; i<ms.getMoveset.size();i++)
{
}
}
}public class Moveset
{
private ArrayList<Moves> moveset;
public Moveset(Moves move1, Moves move2, Moves move3, Moves move4)
{
moveset.add(move1);
moveset.add(move2);
moveset.add(move3);
moveset.add(move4);
}
public ArrayList<Moves> getMoveset()
{
return moveset;
}

