So for my game I am using a tile based system , how would I implement it so that instead of having a switch statement with each tile in it that is returned based on the id, that I use a system that gets a new object based on the object in an array . If that was a bit iffy to understand , if I had an array containing two objects , A and B , I then want to make a new object that I can use but wont be the same as A , like creating a new A object but only doing it from the array.