MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / getNextBodyPart

Method getNextBodyPart

javascript_games/ducklings.js:223–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221 }
222
223 getNextBodyPart() {
224 // Calls the appropriate display method for the next body
225 // part that needs to be displayed. Sets partToDisplayNext to
226 // null when finished.
227 if (this.partToDisplayNext === HEAD) {
228 this.partToDisplayNext = BODY;
229 return this.getHeadStr();
230 } else if (this.partToDisplayNext === BODY) {
231 this.partToDisplayNext = FEET;
232 return this.getBodyStr();
233 } else if (this.partToDisplayNext === FEET) {
234 this.partToDisplayNext = null;
235 return this.getFeetStr();
236 }
237 }
238}
239
240

Callers 1

mainFunction · 0.45

Calls 3

getHeadStrMethod · 0.95
getBodyStrMethod · 0.95
getFeetStrMethod · 0.95

Tested by

no test coverage detected