This assignment is focused on the active parts of your game. You have already done a bit with this in your player, but now it is time for you to get some entities moving around. As part of this, I want you to write an implementation of PriorityQueue and make your GameSetup create and use one of them. To complement this you will make some moving entities and write them so that they will be updated occasionally. You don't have to finish all of your moving entities, but the more you do now, the fewer you will have to do before the end of the semester.
Design
The design for this assignment will include UML class diagrams for the classes that you will write. It should also include text descriptions of your implementation of the PriorityQueue and the entities you create. It will also include all of the classes that you wrote for the earlier assignments.
Remember that the design should put in comments for every class and method that tell two things. It needs to specify how the classes fit into the game play as well as give some implication as to what the methods are going to do to make that a reality.
Again I recommend that this be submitted by putting the files generated in Together in a new directory that will be visible on the web and send me a link.
Code
There are two distinct parts to the coding for this project. The first in the PriorityQueue implementation. You can see that interface in the project description. For the implementation, I would like for you to write a sorted linked list. This is not the most efficient implementation of that interface, but it is fairly good and works well for us now. Later in the semester we will be writing a heap based priority queue that can implement the interface more efficiently.
The role of the PriorityQueue in the framework is fairly simple. Each tick, the framework uses the priority queue that it gets from GameSetup to get all of the entities that need to be updated in that tick. It does this in a loop where it pulls off entities one at a time and calls their update methods. After it calls update on a given entity, it adds that entity back into the priority queue. For this not to produce an infinite loop, the entity's update time has to either be larger than the time of the current tick, or -1. When it is -1, the entity will not be added back into the queue at that time. This means that the entity will not have its update method called in future ticks until some piece of code adds that entity back into the queue. Any time an entity is removed from the game (killed or whatever), it needs to return -1 for its update time to make sure that time is not wasted updating it.
Have your PriorityQueue implementation include a main that does some testing of whether or not it works. To do this, you should probably create a "DummyEntity" class or something similar so that you can easily put elements into your queue with various update times. Then make sure that they get pulled off in the proper order.
The second part of the implementation on this assignment is writing the moving or animated entities. This is simply the task of creating some entities that have update methods that make them do something and making sure they get put on the PriorityQueue. This includes giving them the ability to interact with one another as well as with the player. To do interactions between entities they need to walk the list of entities for their screens.