if(array[3][3].getCall() == false && array[3][3].getUser() == Car.user.NONE )
{
array[3][3] = new Car('s', Car.user.USER, false);
aCounter++;
System.out.println("everything is fine");
}
this bit of code gives me: error: non-static variable user cannot be referenced from a static context.
public class Car
{
public enum User { USER, COMP, NA };
private char object;
public User user;
private boolean call;
public Car(char object, User user, boolean call)
{
this.object = object;
this.user = user;
this.call = call;
}
}
Enum is public, because I get "user has private access errors" otherwise. I know that enum is a non-static variable declared inside a constructor, so I am thinking that this is where the error comes from, but I have no clue as to how to fix it.