Assignment 5 - Spring 2019

Assigned: Mon, Apr 29
Due: Tue, May 7

For this assignment you will:

  • Develop your own version of the classic worm game (in 5 stages)
  • Use a random function to make the game more exciting
  • Be able to impress your family and friends when you show them your worm game!

Assignment Setup

  1. Use your CS account to login to one of the Linux workstations in the classroom or Asprey Lab.

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

  3. Login to Github and you will be prompted to accept this assignment
    • Note: this will create your own copy of Assignment 5 for you to work on, but it's not on your Linux account yet

  4. Open a terminal window.

  5. Create a new directory for this assignment in your cs101 directory by entering the following at the Linux prompt:
    $ cd cs101
    $ mkdir assign5
    $ cd assign5

  6. Type the following commands to pull down a copy of this lab from GitHub:
    $ git init
    $ git remote add origin
    $ git pull origin master


Your starting point for this assignment is HtDP/2e Section 12.5 (pp. 352–355), Feeding Worms. Reread this section, and follow the instructions for exercises 215 through 219. These exercises build on each other, and guide you through the design and implementation of a Worm game, adding new features one step at a time. So be sure to finish each exercise before moving onto the next.

Save each stage of your game in the Racket files whose names correspond to the individual exercises: exercise215.rkt, exercise216.rkt, exercise217.rkt, exercise218.rkt, and exercise219.rkt.

Design Recipe

Be sure to follow the Design Recipe for your data definitions and each function you develop. Each exercise is worth 20% of the total grade. That is, completing all but the last exercise, it is possible to earn up to 80% for this assignment. If you want to go for full credit, you must complete exercise 219.

From a terminal window, type the following commands at the Linux prompt:

$ git commit -am "finished assignment 5"
$ git push -u origin master