Prelab 10 Notes

When did we talk about…

This lab focuses on object-oriented programming (OOP) with PyGame, that is the topics we discussed this week. In particular the example games and code will be most relevant.

Nouns and verbs

In this lab we will implementing the “Piper Game”. The sand piper must race the clock to collect as many clams on the beach without getting wet. A screencast of a run of the game is shown below.

Piper game

As we did earlier in class, let’s enumerate the functionality in the game: (Show some potential functionality:)

As before, the red words, or nouns, are the data in our game and the blue words, or verbs, are the actions we to apply to those nouns. The nouns generally map to our Player, Clam and Wave classes while the blue verbs map to methods.

Do you see any nouns that might map to instance variables? Show some potential instance variables:

We are looking for nouns that seem to “belong” to other nouns. One we noted previously, position. The other is invisible, i.e., whether the clam is visible or not.