I am making a maze type game and the way i have it now is i have one of these
for every block. and right now i will have to have hundreds of these. so is there a way to condense it but change still have the location different? here are the first 10
public Position p1=new Position(1,1, new Wall(0), this);
public Position p1=new Position(1,1, new Wall(0), this); public Position p2=new Position(2,1, new Wall(0), this); public Position p3=new Position(3,1, new Wall(0), this); public Position p4=new Position(4,1, new Wall(0), this); public Position p5=new Position(20,1, new Wall(0), this); public Position p6=new Position(21,1, new Wall(0), this); public Position p7=new Position(22,1, new Wall(0), this); public Position p8=new Position(23,1, new Wall(0), this); public Position p9=new Position(1,2, new Wall(0), this); public Position p10=new Position(23,2, new Wall(0), this);