Menu

#1 Create a config file.

1.0
open
nobody
HW2P2 (2)
2011-10-13
2011-10-13
No

Rather than define the locations of all of your game objects using Java code, define them in a text configuration file that is read in at startup. You will need to invent a syntax for this file that allows you to specify all of the details necessary to create individual game objects. You want this to be extensible. In other words, if you write a new type of GameObject, you shouldn’t have to edit your configuration management code to handle it explicitly. Hint: consider using Java’s reflection framework. If you are successful at this, the TA’s should be able to edit, or replace, this configuration file and create an entirely new scene without having to open or compile your code.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB