I currently have 2 classes. My bot:
public class Bot {
private int X;
private int Y;
private int degress;
public int getX() {
return X;
}
public int getY() {
return Y;
}
public int getDegress() {
return degress;
}
public void setX(int X) {
this.X = X;
}
public void setY(int Y) {
this.Y = Y;
}
}
and my main code.. the problem i am having is when trying to set the degrees in my main class. What I am trying to do is something similar to:
bots.set(bots.get(1).getDegress(),+1);
but gives me this error "The method set(int, Bot) in the type ArrayList is not applicable for the arguments (int, int)"
and how my ArrayList looks like
public static ArrayList<Bot> bots = new ArrayList<Bot>();
So to sum it up. How could i come about to change X, Y or Degress with the bots.set?
bots.set(bots.get(1).getDegress(),+1);tobots.set(bots.get(1).getDegress()+1);