Jump to content

My pips


Recommended Posts

  • Administrator
Posted

you dont know difference between a class and a enum. remove scripter rank 

public enum Direction {

ENUM_UP(0, -1),

ENUM_DOWN(0, 1),

ENUM_RIGHT(1, 0),

ENUM_LEFT(-1, 0);

private int x;

private int y;

private Direction(int x, int y){

this.x = x;

this.y = y;

}

public int getEnumX(){

return x;

}

public int getEnumY(){

return y;

}

 

 

 

}

public class Direction{

public static final Direction UP = new Direction(0, -1) ;

public static final Direction DOWN = new Direction(0, 1) ;

public static final Direction LEFT = new Direction(-1, 0) ;

public static final Direction RIGHT = new Direction(1, 0) ;

private int x ;

private int y ;

private Direction(int x, int y){

this.x = x ;

this.y = y ;

}

public int getX(){

return x;

}

public int getY(){

return y;

}

}

  • Like 1
Posted

public enum Direction {

ENUM_UP(0, -1),

ENUM_DOWN(0, 1),

ENUM_RIGHT(1, 0),

ENUM_LEFT(-1, 0);

private int x;

private int y;

private Direction(int x, int y){

this.x = x;

this.y = y;

}

public int getEnumX(){

return x;

}

public int getEnumY(){

return y;

}

 

 

 

}

public class Direction{

public static final Direction UP = new Direction(0, -1) ;

public static final Direction DOWN = new Direction(0, 1) ;

public static final Direction LEFT = new Direction(-1, 0) ;

public static final Direction RIGHT = new Direction(1, 0) ;

private int x ;

private int y ;

private Direction(int x, int y){

this.x = x ;

this.y = y ;

}

public int getX(){

return x;

}

public int getY(){

return y;

}

}

 

SUCH WOW 

 

I expect you to write a script then.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...