Calls the appropriate display method for the next body part that needs to be displayed. Sets partToDisplayNext to None when finished.
(self)
| 187 | return ' ^ ^ ' |
| 188 | |
| 189 | def getNextBodyPart(self): |
| 190 | """Calls the appropriate display method for the next body |
| 191 | part that needs to be displayed. Sets partToDisplayNext to |
| 192 | None when finished.""" |
| 193 | if self.partToDisplayNext == HEAD: |
| 194 | self.partToDisplayNext = BODY |
| 195 | return self.getHeadStr() |
| 196 | elif self.partToDisplayNext == BODY: |
| 197 | self.partToDisplayNext = FEET |
| 198 | return self.getBodyStr() |
| 199 | elif self.partToDisplayNext == FEET: |
| 200 | self.partToDisplayNext = None |
| 201 | return self.getFeetStr() |
| 202 | |
| 203 | # If this program was run (instead of imported), run the game: |
| 204 | if __name__ == '__main__': |
no test coverage detected