CPSC220 Assignment 1.5
Real-time Program: Version 1
Due Before 8:40AM on Friday, September 17th
Details
Extend your real-time program from assignment 0.5 to store non-moving objects in a sorted list. Your program should:
- include a testing mode where nothing is drawn except for the current frames per second.
- include some sort of interaction between the moving object and the non-moving object (i.e. collision detection, move to nearest, plot path to avoid, etc.)
- use the sorted list from assignment 1 to store the non-moving objects and efficiently perform the above interaction (use the find method to determine which objects could potentially interact).
- be able to switch between using a sorted list and an unsorted list to store objects when run (it does not have to be able to switch between the two while running)
As usual, use good programming techniques. You should use good variable names, whitespace, comments, and follow the Java coding conventions. Make your code easy to read and understand by keeping lines of code and methods simple and short.
Extra credit:
- Implement both linear and binary search on the sorted list and compare the performance of the two.
- Implement the efficient drawing using find and the sorted list.
- Store non-moving objects in two lists (sorted by x and y coordinates) to make interaction more efficient.
Submission: Create a tar file with your code (include your name in the tar file name) and copy it to the directory ~bouchard/CPSC220/assign1.5 on cs.roanoke.edu by 8:40AM on Friday, September 17th.