CPSC 110 Lecture 8: cpsc 110 104
CPSC 110 verified notes
8/26View all
Document Summary
; design a world program in which a spider starts at the top of the screen and. Assume the spider always moves at the same speed. ; then improve your program by re-doing the full htdw recipe to add features: ; - pressing the space key resets the spider to the top of the screen. ; - pressing the "a" key changes the spider"s direction. ; - make the spider stop moving down when it reaches the bottom of the screen. ; - draw a line from the top of the screen to the spider, this is the thread. You will need to use add-line for this. ; drracket help desk to see how add-line works. ; - make the spider appear to wiggle as it moves down the screen. ;; constants: (define width 600) (define height 400) (define mts (rectangle width height solid white)) ; background.