Comp 150-001, MWF 12:35, Crown 105

Week 8




Homework 6: Invaders

Start with invaders.py. Add some features. Here are a few suggestions:

A harder feature would be launching a "missile" that gets animated along with the invader. If they collide (at a later point!) the invader disappears. Having multiple things at once that are moving can be hard. All of them need their positions updated in the same animation loop. nbounce does this.




nbounce.py

    major bug: position of time.sleep()!
    animate loop

    global variables

    grouping: tuples, lists, objects

nbounce2.py:

    update method inside the object.

invaders.py

illusion1.py