CSSE 120 -- Intro. to Software Development

Homework 17

  1. Complete the assigned reading for the next session: Zelle Sections 12.1–12.2.
  2. Complete the Angel quiz over the reading assignment. You'll find the quiz on the course Angel page, under Lessons → Homework → Homework 17 → Object-Oriented Design.
  3. Checkout the code for this assignment from the ExploringLists project, if you didn't do so in class.
  4. For the Tetris project you will be sliding and possibly rotating blocks, which might be stored as a list of lists of blocks.  This exercise will help to prepare you for your project by exposing you to both sliding and rotating rows and columns of lists and lists-of-lists.

    1. You will continue to work with the module listSlidingAndRotation.py in the project ExploringLists.  Make sure your name and start date are included in the initial comments. Complete writing the four functions you started in class, testing each as you go by uncommenting (use <Ctrl> +  \  in Eclipse) in main() the call to the function that tests the function you are currently working on. Then implement and test all the other functions marked by TODO:. Commit your work to your repository each time you complete a function.
    2. Uncomment all the lines in the main() function and run it one final time to ensure that all your functions work correctly. Commit the final version of your code to your repository.
  5. Finding the circle with the smallest radius that encloses a set of points.

    1. Here, you will modify enclosingCircle.py in the project ExploringLists. Make sure to include your name and start date in the initial comments. Modify function collectPoints() so that it adds the clicked point to the list of points and displays the clicked point.  The point, p, should be displayed as a circle centered at p with a radius of 10 pixels.  Delete the print statement in that function. Once you are certain that your implementation works, commit your work to your repository.
    2. Implement and test the function smallestEnclosingCircle(). You might wish to consider using function(s) from the listDemos.py module in this project. The debugger in Eclipse might be your friend for this part. Once you believe that your implementation works, commit your work to your repository.
    3. You are now ready to draw the smallest enclosing circle for a list of points.  Implement and test the drawEnclosingCircle() function. Modify function collectPoints() so that it invokes this function to draw the enclosing circle. Display the center point of the enclosing circle so that its color is different from the color of the display of the other points.
    4. Commit the final version of your code to your repository.
  6. TETRIS: Tetris is a video game that's fun to play.  For your group project you are going to implement this game.  The links below demo how the game is played:

    1. The Original Human TETRIS Performance by Guillaume Reymond.

    2. TGM 3 Tetris Arika !!! Invisible Tetris.