Assignment #4 Description

In this assignment you will begin to construct the entities that you want to have in your game. You should probably create all the subclasses of GameEntity that you intend to use, though you don't have to complete all of them for this assignment. The ones that don't move should be easy to do and you should be able to complete those. You also need to edit your Player code so that your Player interacts with those Entities in the way that it should. In order for your game to be able to use all of these game entities, you need your Screen class to actually be able to hold a real list of GameEntities. For this reason you will also need to write some form of entity list that you can put into your Screen class.

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 Player. It will also include all of the classes that you wrote for the last assignment. Your project is going to continue to get larger over the semester and it should include all your previous work so that someone can see how everything fits together.

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

This assignment will have you writing quite a few classes though many of them will be similar. The code can be broken up into three main pieces. You won't necessarily write them in this order. In fact, I would recommend writing one GameEntity, then write the list implementation, then both create the other GameEntities and edit the player to interact with those Entities.

GameEntities: Try to think of all the things in your game that should be entities. You will create classes for them that implement the GameEntity interface and implement the methods in it. You are familiar with the methods already because you had to write them for the Player class as well. If an entity doesn't move and isn't animated it might not even really need an update method. Then again, it might make a better block than an entity depending on how the Player interacts with it.

Player Interaction: You also need to write code that will handle the interactions between the Player and the new GameEntities. This code can go in either the Player class or the GameEntity classes. You can think about which one makes more sense for your code. There really isn't a wrong decision here, though some ways will be easier and more efficient than others. Be sure to think about how often the update methods of your entities are being called when doing this.

Entity List: You need to write your own linked list code that allows you to fully implement the addEntity, removeEntity, getFirstEntity, and getNextEntity methods of your Screen class. It can be an unsorted, singly linked list.