Hi all. I'm working on a small java game which is a sort of clone of the 1995 game Theme Hospital. I've recently been working on the GUI and the Level structure now I have the path finding and grid working. My current way of "building stuff" consists of one room and one reception desk, and it works ok so far, but I need to implement a way to add different types of rooms and items. Here is my current code on the button press for the creation of the object (http://snipt.org/lUm).
I'm sure there must be a better way to do this! My implementation is poor, I know, but I have only recently began to understand how to use abstract classes and interfaces.
Actually setting the properties of the room or item, I currently have no issue with. I am thinking ahead, but I love how I get different opinions on the best way to do things here on Stack. At ideas on how such a thing should be achieved? Any examples of this sort of thing? I would search it, but I'm not really sure what to search for, as I don't if what I'm doing has an exact name.
I'm sorry if I haven't been too clear exactly what I'm talking about. I will gladly answer any further questions on this, and or upload more sections of code as needed or requested.
Thanks in advance for your time and thoughts!