Assignment 5 - Spring 2021

Assigned: Tue, May 11
Due: Mon, May 24, 11:59pm

For this assignment you will design a world (big-bang) program that implements a simple version of the classic Tetris game, as described in Section 12.6 of How to Design Programs, Second Edition.

  1. Open a browser and copy/paste this URL:

  2. Login to Github and you will be prompted to accept this assignment
    1. After you click on the [Accept this assignment] button, you will see a new page display in your browser with the message:
      1. You accepted the assignment, Assignment 5. We're configuring your repository now. This may take a few minutes to complete. Refresh this page to see updates.
    2. After you refresh the page you should see a page with the message: “You're ready to go!”
    3. Note: this will create your own copy of Assignment 5 for you to work on, but it's not on your computer yet.

  3. Click on the URL where your assignment repository has been created:
    1. you are now on the GitHub page for your Assignment 5 repository

  4. Click on the green button to download your [Code]
    1. a “Clone” dialog box will appear, with the HTTPS tab underlined in red (if not, click on the HTTPS tab to select it)
    2. select the last option labeled “Download ZIP” and save it on your computer
    3. move the Assignment 5 zip file from its download location to your cs101 course folder.
    4. extract the contents of the zip file either by double-clicking on it or control-clicking on it and selecting the appropriate option to extract its contents
    5. navigate into your assign5 folder and confirm you see the assign5.rkt file there.

Read section 12.6 in our text, How to Design Programs, Second Edition. Here's the URL:

You will implement your Simple Tetris game by working through exercises 220 through 223. You will have the opportunity to customize your game, as you like, but these exercises provide a basic framework for implementing your game.

Be sure to follow the Design Recipe for each function you develop.

I've given you a head-start and completed exercise 220 for you. Read through tetris-220.rkt, run it, and be sure you understand the code (all steps of the Design Recipe for each function) before attempting exercise 221. Each exercise will be completed in the corresponding .rkt file, with the code from the previous exercise as the starting point.

Credit will be awarded based on:

  • how completely you implement your game as specified by exercises 220 through 223,
  • any personal touches you add to your game to express your creativity, and
  • how closely you follow each step of the design recipe for the functions you write to implement your Tetris game.

  • From your browser on the GitHub page for your Assignment 5 repository, click on the [Add file] drop-down button and select “Upload files”
  • From your assign5 folder on your desktop, click and drag all four tetris-22*.rkt files onto your browser where it says, “Drag files here to add them to your repository”
    • just below the region of the webpage you should see all four files appear; they'll be just above the Commit Changes section of the page.
  • You are now ready to commit changes! Click on the green [Commit changes] button.
  • Your updated assign5.rkt file file should now be in your Assignment 5 GitHub repository.